X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_ctf.qc;h=b34e3f59f51fe58ac3f5cccb5828b68fae45f242;hb=bcfb2c28a83d43a76cdc18de1f00b4d191da55e5;hp=3c714ad5396bbb2bf237a24782722d42162d551b;hpb=4299b97f93fc4753665e198066970bd51bb3b06a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 3c714ad53..b34e3f59f 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -304,7 +304,7 @@ void ctf_CaptureShield_Touch(entity this, entity toucher) vector mymid = (this.absmin + this.absmax) * 0.5; vector theirmid = (toucher.absmin + toucher.absmax) * 0.5; - Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, mymid, normalize(theirmid - mymid) * ctf_captureshield_force); + Damage(toucher, this, this, 0, DEATH_HURTTRIGGER.m_id, DMG_NOWEP, mymid, normalize(theirmid - mymid) * ctf_captureshield_force); if(IS_REAL_CLIENT(toucher)) { Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED); } } @@ -865,7 +865,7 @@ void ctf_CheckStalemate() } } -void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) +void ctf_FlagDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) { if(ITEM_DAMAGE_NEEDKILL(deathtype)) { @@ -1695,7 +1695,7 @@ void havocbot_role_ctf_carrier(entity this) { // Can't navigate to my own base, suicide! // TODO: drop it and wander around - Damage(this, this, this, 100000, DEATH_KILL.m_id, this.origin, '0 0 0'); + Damage(this, this, this, 100000, DEATH_KILL.m_id, DMG_NOWEP, this.origin, '0 0 0'); return; } } @@ -2085,7 +2085,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink) bool b1 = false, b2 = false, b3 = false, b4 = false, b5 = false; // TODO: kill this, we WANT to show the other flags, somehow! (note: also means you don't see if you're FC) // initially clear items so they can be set as necessary later. - player.ctf_flagstatus &= ~(CTF_RED_FLAG_CARRYING | CTF_RED_FLAG_TAKEN | CTF_RED_FLAG_LOST + STAT(CTF_FLAGSTATUS, player) &= ~(CTF_RED_FLAG_CARRYING | CTF_RED_FLAG_TAKEN | CTF_RED_FLAG_LOST | CTF_BLUE_FLAG_CARRYING | CTF_BLUE_FLAG_TAKEN | CTF_BLUE_FLAG_LOST | CTF_YELLOW_FLAG_CARRYING | CTF_YELLOW_FLAG_TAKEN | CTF_YELLOW_FLAG_LOST | CTF_PINK_FLAG_CARRYING | CTF_PINK_FLAG_TAKEN | CTF_PINK_FLAG_LOST @@ -2099,7 +2099,7 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink) if(flag.team == NUM_TEAM_2 && !b2) { b2 = true; t = CTF_BLUE_FLAG_CARRYING; t2 = CTF_BLUE_FLAG_TAKEN; t3 = CTF_BLUE_FLAG_LOST; } if(flag.team == NUM_TEAM_3 && !b3) { b3 = true; t = CTF_YELLOW_FLAG_CARRYING; t2 = CTF_YELLOW_FLAG_TAKEN; t3 = CTF_YELLOW_FLAG_LOST; } if(flag.team == NUM_TEAM_4 && !b4) { b4 = true; t = CTF_PINK_FLAG_CARRYING; t2 = CTF_PINK_FLAG_TAKEN; t3 = CTF_PINK_FLAG_LOST; } - if(flag.team == 0 && !b5) { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING; t2 = CTF_NEUTRAL_FLAG_TAKEN; t3 = CTF_NEUTRAL_FLAG_LOST; player.ctf_flagstatus |= CTF_FLAG_NEUTRAL; } + if(flag.team == 0 && !b5) { b5 = true; t = CTF_NEUTRAL_FLAG_CARRYING; t2 = CTF_NEUTRAL_FLAG_TAKEN; t3 = CTF_NEUTRAL_FLAG_LOST; STAT(CTF_FLAGSTATUS, player) |= CTF_FLAG_NEUTRAL; } switch(flag.ctf_status) { @@ -2107,14 +2107,14 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink) case FLAG_CARRY: { if((flag.owner == player) || (flag.pass_sender == player)) - player.ctf_flagstatus |= t; // carrying: player is currently carrying the flag + STAT(CTF_FLAGSTATUS, player) |= t; // carrying: player is currently carrying the flag else - player.ctf_flagstatus |= t2; // taken: someone else is carrying the flag + STAT(CTF_FLAGSTATUS, player) |= t2; // taken: someone else is carrying the flag break; } case FLAG_DROPPED: { - player.ctf_flagstatus |= t3; // lost: the flag is dropped somewhere on the map + STAT(CTF_FLAGSTATUS, player) |= t3; // lost: the flag is dropped somewhere on the map break; } } @@ -2122,10 +2122,10 @@ MUTATOR_HOOKFUNCTION(ctf, PlayerPreThink) // item for stopping players from capturing the flag too often if(player.ctf_captureshielded) - player.ctf_flagstatus |= CTF_SHIELDED; + STAT(CTF_FLAGSTATUS, player) |= CTF_SHIELDED; if(ctf_stalemate) - player.ctf_flagstatus |= CTF_STALEMATE; + STAT(CTF_FLAGSTATUS, player) |= CTF_STALEMATE; // update the health of the flag carrier waypointsprite if(player.wps_flagcarrier) @@ -2475,7 +2475,7 @@ MUTATOR_HOOKFUNCTION(ctf, SpectateCopy) entity spectatee = M_ARGV(0, entity); entity client = M_ARGV(1, entity); - client.ctf_flagstatus = spectatee.ctf_flagstatus; + STAT(CTF_FLAGSTATUS, client) = STAT(CTF_FLAGSTATUS, spectatee); } MUTATOR_HOOKFUNCTION(ctf, GetRecords)