- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line. - Fixed: P_SpawnPuff assumed that all melee attacks have the same range (MELEERANGE) and didn't set the puff to its melee state if the range was different. Even worse, it checked a global variable for this so the behavior was undefined when P_SpawnPuff was called from anywhere else but P_LineAttack. To reduce the amount of parameters I combined this information with the hitthing and temporary parameters into one flags parameter. Also changed P_LineAttack so that it gets passed an additional parameter that specifies whether the attack is a melee attack or not and set this to true in all calls that are to be considered melee attacks. I couldn't use the damage type because A_CustomPunch and A_CustomMeleeAttack allow passing any damage type they want. - Added a sprite option as an alternative of particles for FX_ROCKET and FX_GRENADE. SVN r879 (trunk)
This commit is contained in:
parent
de485ec662
commit
cb1bd7739e
29 changed files with 194 additions and 83 deletions
|
|
@ -475,6 +475,9 @@ static int TryFindSwitch (side_t *side, int Where)
|
|||
//
|
||||
bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
|
||||
{
|
||||
// if this line is one sided this function must always return success.
|
||||
if (line->sidenum[0] == NO_SIDE || line->sidenum[1] == NO_SIDE) return true;
|
||||
|
||||
fixed_t checktop;
|
||||
fixed_t checkbot;
|
||||
side_t *side = &sides[line->sidenum[sideno]];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue