X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_keepaway.qc;h=9134353e015574860dc4478938633ba80e3a56ec;hb=fc972486ea0e2edaadb44ba226a0672d8ad19226;hp=8d3511eceda0750e74266d5649133b69f9c15e84;hpb=ff029da4a92ae6c3520341a427dc904d20fe6cce;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc index 8d3511ece..9134353e0 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@ -3,6 +3,7 @@ void ka_TouchEvent(void); void ka_RespawnBall(void); void ka_DropEvent(entity); void ka_TimeScoring(void); +void ka_EventLog(string, entity); entity ka_ball; @@ -125,6 +126,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth other.effects |= autocvar_g_keepaway_ballcarrier_effects; // messages and sounds + ka_EventLog("pickup", other); Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA); WriteByte(MSG_BROADCAST, SVC_CENTERPRINT); WriteString(MSG_BROADCAST, strcat(other.netname, "^7 has picked up the ball!")); @@ -167,6 +169,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los plyr.effects &~= autocvar_g_keepaway_ballcarrier_effects; // messages and sounds + ka_EventLog("dropped", plyr); Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA); WriteByte(MSG_BROADCAST, SVC_CENTERPRINT); WriteString(MSG_BROADCAST, strcat(plyr.netname, "^7 has dropped the ball!")); @@ -205,6 +208,12 @@ void ka_TimeScoring() } } +void ka_EventLog(string mode, entity actor) // use an alias for easy changing and quick editing later +{ + if(autocvar_sv_eventlog) + GameLogEcho(strcat(":ka:", mode, ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); +} + MUTATOR_HOOKFUNCTION(ka_Scoring) { if((frag_attacker != frag_target) && (frag_attacker.classname == "player"))