From: Mario Date: Wed, 9 Mar 2016 04:41:26 +0000 (+1000) Subject: Add a new key to override the initial item respawn delay X-Git-Tag: xonotic-v0.8.2~1146 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=da22c31fc2f03446e952f28731863575f8a86835;p=xonotic%2Fxonotic-data.pk3dir.git Add a new key to override the initial item respawn delay --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 7da52d573..876bc6347 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -615,7 +615,7 @@ void Item_ScheduleRespawn(entity e) void Item_ScheduleInitialRespawn(entity e) { Item_Show(e, 0); - Item_ScheduleRespawnIn(e, game_starttime - time + ITEM_RESPAWNTIME_INITIAL(e)); + Item_ScheduleRespawnIn(e, game_starttime - time + ((e.respawntimestart) ? e.respawntimestart : ITEM_RESPAWNTIME_INITIAL(e))); } float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax, float mode) diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index f9c056fbd..9d1090bac 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -152,6 +152,7 @@ noref bool require_spawnfunc_prefix; FIELD_SCALAR(fld, platmovetype) \ FIELD_SCALAR(fld, race_place) \ FIELD_SCALAR(fld, radius) \ + FIELD_SCALAR(fld, respawntimestart) \ FIELD_SCALAR(fld, respawntimejitter) \ FIELD_SCALAR(fld, respawntime) \ FIELD_SCALAR(fld, restriction) \ diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index dd47b86a4..050cccb99 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -106,6 +106,7 @@ void() player_setupanimsformodel; .float scheduledrespawntime; .float respawntime; .float respawntimejitter; +.float respawntimestart; //.float chasecam; .float damageforcescale;