mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-04-02 07:30:46 +00:00
Fix idItem::GiveToPlayer in CallFunc function when picking up items like ammo or health, that crashes on dhewm3, it works better with inv_carry only
This commit is contained in:
parent
f924ef8641
commit
be7bac0455
1 changed files with 4 additions and 4 deletions
|
@ -585,12 +585,12 @@ bool idItem::GiveToPlayer( idPlayer *player ) {
|
|||
}
|
||||
|
||||
if ( val ) {
|
||||
if ( spawnArgs.GetString( "scriptobject" ) != "" ) {
|
||||
if ( spawnArgs.GetString( "scriptobject" ) != ""
|
||||
&& spawnArgs.GetBool( "inv_carry" ) ) { // if the item is ammo or health, game crashes, so that doesn't work in dhewm3
|
||||
if ( !g_noPickupNotification.GetBool() && !spawnArgs.GetBool( "dontNotifyOnPickup" ) ) {
|
||||
// CallFunc( "pickup_message" ); // doesn't work in dhewm3, crashes
|
||||
player->ShowHudMessage( va("You got the %s\n", spawnArgs.GetString( "inv_name" )) );
|
||||
CallFunc( "pickup_message" );
|
||||
}
|
||||
// CallFunc( "pickup_effect" ); // doesn't work in dhewm3, crashes
|
||||
CallFunc( "pickup_effect" );
|
||||
}
|
||||
|
||||
gameLocal.SetPersistentRemove( name.c_str() );
|
||||
|
|
Loading…
Reference in a new issue