Co-op matches of editor campaigns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0966e3318f
commit
abe01ff23e
13 files changed
+394
-44
No files matched your search
+8
-3
@@ -1624,9 +1624,12 @@ impl Game {
|
||||
}
|
||||
|
||||
fn after_economy(&mut self, dt: f32) {
|
||||
// from here on it is about the local master and the humans: that side is switched in first
|
||||
// the shared world (waves, units, towers, rivals ...) runs from the first master's side: the
|
||||
// same on every computer of a match, whichever master plays at this one. Single-player
|
||||
// games only have that one side.
|
||||
let local = self.local_side;
|
||||
self.switch_to(local);
|
||||
let first = self.master_sides().first().copied().unwrap_or(local);
|
||||
self.switch_to(first);
|
||||
if self.waves_on() {
|
||||
self.wave_tick(dt);
|
||||
}
|
||||
@@ -1636,7 +1639,7 @@ impl Game {
|
||||
|
||||
self.update_contested();
|
||||
self.update_units(dt);
|
||||
self.switch_to(local); // update_units worked master by master
|
||||
self.switch_to(first); // update_units worked master by master
|
||||
self.update_towers(dt);
|
||||
self.update_reveals(dt);
|
||||
self.update_graves(dt);
|
||||
@@ -1644,6 +1647,8 @@ impl Game {
|
||||
self.update_rivals(dt);
|
||||
}
|
||||
self.update_dwarves(dt);
|
||||
// the end of the game and the fog are about the master at this computer
|
||||
self.switch_to(local);
|
||||
self.check_end();
|
||||
self.update_fog(dt);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user