From: Lyberta Date: Sun, 21 Jan 2018 03:00:22 +0000 (+0300) Subject: Renamed ShouldGiveRandomStartWeapons to ForbidRandomStartWeapons. X-Git-Tag: xonotic-v0.8.5~2379^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bfb9c564b4a93cfb5c97c1eff079541f78e2ee3f;p=xonotic%2Fxonotic-data.pk3dir.git Renamed ShouldGiveRandomStartWeapons to ForbidRandomStartWeapons. --- diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index 329fc0dde..85bef1d49 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -178,7 +178,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, MakePlayerObserver) instagib_stop_countdown(player); } -MUTATOR_HOOKFUNCTION(mutator_instagib, ShouldGiveRandomStartWeapons) +MUTATOR_HOOKFUNCTION(mutator_instagib, ForbidRandomStartWeapons) { return true; } diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index d50094fb5..5611042b0 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -167,7 +167,7 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink) PHYS_INPUT_BUTTON_ATCK2(player) = false; } -MUTATOR_HOOKFUNCTION(ok, ShouldGiveRandomStartWeapons) +MUTATOR_HOOKFUNCTION(ok, ForbidRandomStartWeapons) { return true; } diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 603048387..ec6342a2a 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -558,7 +558,7 @@ void PutPlayerInServer(entity this) this.health = start_health; this.armorvalue = start_armorvalue; this.weapons = start_weapons; - if (MUTATOR_CALLHOOK(ShouldGiveRandomStartWeapons, this) == false) + if (MUTATOR_CALLHOOK(ForbidRandomStartWeapons, this) == false) { GiveRandomWeapons(this, random_start_weapons_count, autocvar_g_random_start_weapons, random_start_ammo); diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index eae1a3ad3..fb452c339 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -25,10 +25,10 @@ MUTATOR_HOOKABLE(PutClientInServer, EV_PutClientInServer); MUTATOR_HOOKABLE(ForbidSpawn, EV_ForbidSpawn); /** called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them. */ -#define EV_ShouldGiveRandomStartWeapons(i, o) \ +#define EV_ForbidRandomStartWeapons(i, o) \ /** player */ i(entity, MUTATOR_ARGV_0_entity) \ /**/ -MUTATOR_HOOKABLE(ShouldGiveRandomStartWeapons, EV_ShouldGiveRandomStartWeapons); +MUTATOR_HOOKABLE(ForbidRandomStartWeapons, EV_ForbidRandomStartWeapons); /** called when a player spawns as player, after shared setup, before his weapon is chosen (so items may be changed in here) */ #define EV_PlayerSpawn(i, o) \