1
0
Fork 0
forked from fn/valve

deathmatch: weapon_ and ammo_ pickups have slightly shorter respawn time

This commit is contained in:
Marco Cawthorne 2025-02-11 02:08:15 -08:00
parent cfebb870a2
commit 86542e94e0
2 changed files with 12 additions and 5 deletions

View file

@ -10,14 +10,14 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
repository: vera/nuclide
ref: Develop
repository: vera/nuclide
ref: Develop
- uses: actions/checkout@v3
with:
fetch-depth: 1
ref: Develop
path: "./${{ github.event.repository.name }}"
ref: Develop
path: "./${{ github.event.repository.name }}"
- name: assemble pk4
run: make dist-pak NAME=bin GAME=${{ github.event.repository.name }}

View file

@ -63,7 +63,14 @@ CodeCallback_StartGameType(void)
}
for (entity s = world; (s = ents.NextItem(s));) {
ents.Input(s, "SetRespawnTime", "30.0f", world);
string isWeapon = substring(s.classname, 0, 7);
string isAmmo = substring(s.classname, 0, 5);
if (isWeapon == "weapon_" || isAmmo == "ammo_") {
ents.Input(s, "SetRespawnTime", "20.0f", world);
} else {
ents.Input(s, "SetRespawnTime", "30.0f", world);
}
}
}