]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a new key to override the initial item respawn delay
authorMario <mario@smbclan.net>
Wed, 9 Mar 2016 04:41:26 +0000 (14:41 +1000)
committerMario <mario@smbclan.net>
Wed, 9 Mar 2016 04:41:26 +0000 (14:41 +1000)
qcsrc/common/t_items.qc
qcsrc/lib/spawnfunc.qh
qcsrc/server/defs.qh

index 7da52d573f630e5c8572c96c34287e42d4308c7e..876bc6347a5e9cc8c1d4a11decca8b61f6ae4ea3 100644 (file)
@@ -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)
index f9c056fbd3ab81e30321f673010bd2da0db064b9..9d1090bac1dbe40711a6ed10139894a5fca96ba4 100644 (file)
@@ -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) \
index dd47b86a461e23ad6bf4bc3217164e84e10cbcf7..050cccb996c1837ab18f13bb56d6f54c158401e5 100644 (file)
@@ -106,6 +106,7 @@ void() player_setupanimsformodel;
 .float scheduledrespawntime;
 .float respawntime;
 .float respawntimejitter;
+.float respawntimestart;
 //.float       chasecam;
 
 .float damageforcescale;