diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/server/gs_game_ctf.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/server/gs_game_ctf.cpp b/src/game/server/gs_game_ctf.cpp index a703e6b6..5c9545fb 100644 --- a/src/game/server/gs_game_ctf.cpp +++ b/src/game/server/gs_game_ctf.cpp @@ -6,6 +6,8 @@ gameobject_ctf::gameobject_ctf() { + flags[0] = 0; + flags[1] = 0; is_teamplay = true; } @@ -65,7 +67,6 @@ void gameobject_ctf::tick() do_team_score_wincheck(); - // do flags for(int fi = 0; fi < 2; fi++) { flag *f = flags[fi]; @@ -79,7 +80,7 @@ void gameobject_ctf::tick() // update flag position f->pos = f->carrying_player->pos; - if(flags[fi^1]->at_stand) + if(flags[fi^1] && flags[fi^1]->at_stand) { if(distance(f->pos, flags[fi^1]->pos) < 32) { |