diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/server/srv_ctf.cpp | 19 | ||||
| -rw-r--r-- | src/game/server/srv_ctf.h | 3 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/game/server/srv_ctf.cpp b/src/game/server/srv_ctf.cpp index 8f345436..7a13b877 100644 --- a/src/game/server/srv_ctf.cpp +++ b/src/game/server/srv_ctf.cpp @@ -27,8 +27,9 @@ void gameobject_ctf::on_player_spawn(class player *p) { } -void gameobject_ctf::on_player_death(class player *victim, class player *killer, int weapon) +void gameobject_ctf::on_player_death(class player *victim, class player *killer, int weaponid) { + gameobject::on_player_death(victim, killer, weaponid); // drop flags for(int fi = 0; fi < 2; fi++) { @@ -73,7 +74,8 @@ void gameobject_ctf::tick() if(players[i]->team == f->team) { // return the flag - f->reset(); + if(!f->at_stand) + f->reset(); } else { @@ -117,19 +119,6 @@ void flag::reset() spawntick = -1; } -void flag::tick() -{ -} - -bool flag::is_grounded() -{ - if(col_check_point((int)(pos.x+phys_size/2), (int)(pos.y+phys_size/2+5))) - return true; - if(col_check_point((int)(pos.x-phys_size/2), (int)(pos.y+phys_size/2+5))) - return true; - return false; -} - void flag::snap(int snapping_client) { if(spawntick != -1) diff --git a/src/game/server/srv_ctf.h b/src/game/server/srv_ctf.h index 70bb7777..e7bc93ab 100644 --- a/src/game/server/srv_ctf.h +++ b/src/game/server/srv_ctf.h @@ -27,9 +27,6 @@ public: flag(int _team); - bool is_grounded(); - virtual void reset(); - virtual void tick(); virtual void snap(int snapping_client); }; |