Skip to content

Commit 6ea7dfc

Browse files
authored
Fist ammo needs to be set to nullptr (#489)
1 parent af738f6 commit 6ea7dfc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

TheForceEngine/ExternalData/DarkForces/weapons.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"textures": ["rhand1.bm", "punch1.bm", "punch2.bm", "punch3.bm"],
1313
"xPos": [172, 55, 59, 56],
1414
"yPos": [141, 167, 114, 141],
15+
"ammo": "",
1516
"wakeupRange": 0,
1617
"variation": 0,
1718
"animFrames": [

TheForceEngine/TFE_ExternalData/weaponExternal.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,12 @@ namespace TFE_ExternalData
763763

764764
if (cJSON_IsString(data) && strcasecmp(data->string, "ammo") == 0)
765765
{
766+
if (strcasecmp(data->valuestring, "") == 0)
767+
{
768+
weapon.ammo = nullptr;
769+
return true;
770+
}
771+
766772
if (strcasecmp(data->valuestring, "ammoEnergy") == 0)
767773
{
768774
weapon.ammo = &TFE_DarkForces::s_playerInfo.ammoEnergy;

0 commit comments

Comments
 (0)