X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fkeepaway%2Fsv_keepaway.qc;h=013123bb0d2f583286f5b19946ffc1b2d66867b3;hp=0dfd1091d55b7bea701a731754c0856adba0b400;hb=4e21f418ad9e6287efb942c1fa2861a51981110a;hpb=ceea2801b21b131246d9af1919d6034fbd336880 diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index 0dfd1091d..013123bb0 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -267,7 +267,8 @@ void ka_Handler_CheckBall(entity this) void ka_Initialize() // run at the start of a match, initiates game mode { - ka_Handler = new(ka_Handler); + g_kaballs = IL_NEW(); + ka_Handler = new_pure(ka_Handler); setthink(ka_Handler, ka_Handler_CheckBall); ka_Handler.nextthink = time; } @@ -386,12 +387,8 @@ MUTATOR_HOOKFUNCTION(ka, PlayerPreThink) { entity player = M_ARGV(0, entity); - // clear the item used for the ball in keepaway - player.items &= ~IT_KEY1; - // if the player has the ball, make sure they have the item for it (Used for HUD primarily) - if(player.ballcarried) - player.items |= IT_KEY1; + STAT(OBJECTIVE_STATUS, player) = BITSET(STAT(OBJECTIVE_STATUS, player), KA_CARRYING, player.ballcarried != NULL); } MUTATOR_HOOKFUNCTION(ka, PlayerUseKey)