mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
Update to ZDoom r 1181:
- Fixed: The conversion of the strings in wbstartstruct_t to FStrings caused crashes when reloading the hub data. - Replaced WALLF_AUTOCONTRAST with WALLF_NOFAKECONTRAST so that the default setting for the flags is 0. - Added: doom2day's smoothlighting - Added: dontincrement argument to A_CheckForReload. - Fixed: The UDMF parser wrote class filter bits into SkillFilter. - Fixed: (SBARINFO patch) DrawInventoryBar has a missing argument in one of its drawgraphic calls. - Added Gez's patch for Heretic's GIMME cheat. - Externalized some cheat strings. - Added Gez's patch for removing MF4_FIRERESIST. (SBARINFO patch) - Fixed: DrawBar would not show. - Fixed: IsSelected took string constants instead of identifiers. - Put more floor/ceiling properties in sector_t into a substructure and added wrapper functions. - Fixed: A_Explode wants the distance parameter as an int, not a fixed_t. - some minor DECORATE fixes. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@161 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
fd39e7f203
commit
92b2fb4803
70 changed files with 692 additions and 512 deletions
|
@ -565,7 +565,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
|||
{
|
||||
ACTION_PARAM_START(4);
|
||||
ACTION_PARAM_INT(damage, 0);
|
||||
ACTION_PARAM_FIXED(distance, 1);
|
||||
ACTION_PARAM_INT(distance, 1);
|
||||
ACTION_PARAM_BOOL(hurtSource, 2);
|
||||
ACTION_PARAM_BOOL(alert, 3);
|
||||
|
||||
|
@ -2192,13 +2192,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckForReload)
|
|||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(count, 0);
|
||||
ACTION_PARAM_STATE(jump, 1);
|
||||
ACTION_PARAM_BOOL(dontincrement, 2)
|
||||
|
||||
if (count <= 0) return;
|
||||
|
||||
AWeapon *weapon = self->player->ReadyWeapon;
|
||||
|
||||
weapon->ReloadCounter = (weapon->ReloadCounter+1) % count;
|
||||
|
||||
|
||||
int ReloadCounter = weapon->ReloadCounter;
|
||||
if(!dontincrement || ReloadCounter != 0)
|
||||
ReloadCounter = (weapon->ReloadCounter+1) % count;
|
||||
else // 0 % 1 = 1? So how do we check if the weapon was never fired? We should only do this when we're not incrementing the counter though.
|
||||
ReloadCounter = 1;
|
||||
|
||||
// If we have not made our last shot...
|
||||
if (weapon->ReloadCounter != 0)
|
||||
if (ReloadCounter != 0)
|
||||
{
|
||||
// Go back to the refire frames, instead of continuing on to the reload frames.
|
||||
ACTION_JUMP(jump);
|
||||
|
@ -2208,6 +2215,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckForReload)
|
|||
// We need to reload. However, don't reload if we're out of ammo.
|
||||
weapon->CheckAmmo( false, false );
|
||||
}
|
||||
|
||||
if(!dontincrement)
|
||||
weapon->ReloadCounter = ReloadCounter;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue