diff --git a/Source/Client/Player.c b/Source/Client/Player.c index 37691fc1..9f075c22 100755 --- a/Source/Client/Player.c +++ b/Source/Client/Player.c @@ -24,7 +24,6 @@ OTHER DEALINGS IN THE SOFTWARE. */ - void Player_PreUpdate(void); void Player_ResetPrediction(void); diff --git a/Source/Server/DefsFields.h b/Source/Server/DefsFields.h index 99970a95..bc5edbd1 100644 --- a/Source/Server/DefsFields.h +++ b/Source/Server/DefsFields.h @@ -125,7 +125,3 @@ /* light */ .string pattern; - -/* info_map_parameters */ -.float buying; -.float bombradius; diff --git a/Source/Server/Rules.c b/Source/Server/Rules.c index b9553a2b..523bb223 100755 --- a/Source/Server/Rules.c +++ b/Source/Server/Rules.c @@ -339,21 +339,3 @@ void Rules_DeathCheck(void) } } } - -/* -================= -SPAWN: info_map_parameters - -Let map authors decide who can buy stuff and who CAN'T. -Also allows people to set the bomb placing radius incase -you want to use info_bomb_target. -================= -*/ -void info_map_parameters( void ) { - if ( self.bombradius ) { - iBombRadius = self.bombradius; - } - if ( self.buying ) { - iBuyRestriction = self.buying; - } -} diff --git a/Source/Server/info_map_parameters.cpp b/Source/Server/info_map_parameters.cpp new file mode 100644 index 00000000..d920e081 --- /dev/null +++ b/Source/Server/info_map_parameters.cpp @@ -0,0 +1,38 @@ +/*** +* +* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved. +* +* See the file LICENSE attached with the sources for usage details. +* +****/ + +class info_map_parameters +{ + void() info_map_parameters; +}; + +void info_map_parameters::info_map_parameters(void) +{ + for (int i = 1; i < ( tokenize( __fullspawndata ) - 1 ); i += 2) { + switch ( argv( i ) ) { + case "bombradius": + iBombRadius = stoi(argv(i + 1)); +#ifdef GS_DEVELOPER + print(sprintf("info_map_parameters: Set C4 radius to %i\n", iBombRadius)); +#endif + break; + case "buying": + iBuyRestriction = stoi(argv(i + 1)); +#ifdef GS_DEVELOPER + print(sprintf("info_map_parameters: Set buy restriction to %i\n", iBuyRestriction)); +#endif + break; + default: + break; + } + } + +#ifndef GS_DEVELOPER + remove(this); +#endif +} diff --git a/Source/Server/progs.src b/Source/Server/progs.src index ba106857..ae148a1f 100755 --- a/Source/Server/progs.src +++ b/Source/Server/progs.src @@ -48,6 +48,9 @@ Money.c ../Shared/spraylogo.cpp ../Shared/pmove.c + +info_map_parameters.cpp + Vox.c Ammo.c Damage.c diff --git a/Source/gs-entbase/client/sprite.cpp b/Source/gs-entbase/client/sprite.cpp index 4800ad2f..b9f8aea4 100644 --- a/Source/gs-entbase/client/sprite.cpp +++ b/Source/gs-entbase/client/sprite.cpp @@ -18,7 +18,7 @@ void Sprite_AnimateThink( void ) { } else { self.frame += 1; } - + self.nextthink = time + ( 1 / self.framerate ); }