mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Fixed: Using printinv before starting a game crashed.
- Fixed: DMover::MovePlane() would not stop moving the plane when it exactly reached its target height unless it was a floor moving down. - Fixed: Actors that can't attack should not be valid haters for Thing_Hate. - Fixed: AArtiBlastRadius::BlastActor() should not set MF2_SLIDE for missiles. - Fixed: sdl/i_input.cpp should check !iscntrl() before generating EV_GUI_Char messages. SVN r36 (trunk)
This commit is contained in:
parent
735e6d72c4
commit
b00360a08c
7 changed files with 114 additions and 88 deletions
|
@ -1,5 +1,12 @@
|
||||||
April 12, 2006
|
April 12, 2006
|
||||||
- Added Jim's Makefile.linux;
|
- Fixed: Using printinv before starting a game crashed.
|
||||||
|
- Fixed: DMover::MovePlane() would not stop moving the plane when it exactly
|
||||||
|
reached its target height unless it was a floor moving down.
|
||||||
|
- Fixed: Actors that can't attack should not be valid haters for Thing_Hate.
|
||||||
|
- Fixed: AArtiBlastRadius::BlastActor() should not set MF2_SLIDE for missiles.
|
||||||
|
- Fixed: sdl/i_input.cpp should check !iscntrl() before generating EV_GUI_Char
|
||||||
|
messages.
|
||||||
|
- Added Jim's Makefile.linux.
|
||||||
- Changed: Decal scales now use full precision fixed point numbers.
|
- Changed: Decal scales now use full precision fixed point numbers.
|
||||||
- Changed: Keeping impact decals in their own statlist is enough to keep track
|
- Changed: Keeping impact decals in their own statlist is enough to keep track
|
||||||
of them for when one needs to be destroyed. There's no need to maintain a
|
of them for when one needs to be destroyed. There's no need to maintain a
|
||||||
|
|
|
@ -172,7 +172,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush,
|
||||||
dest = -m_Sector->ceilingplane.d;
|
dest = -m_Sector->ceilingplane.d;
|
||||||
}
|
}
|
||||||
m_Sector->floorplane.ChangeHeight (speed);
|
m_Sector->floorplane.ChangeHeight (speed);
|
||||||
if (m_Sector->floorplane.d < dest)
|
if (m_Sector->floorplane.d <= dest)
|
||||||
{
|
{
|
||||||
m_Sector->floorplane.d = dest;
|
m_Sector->floorplane.d = dest;
|
||||||
flag = P_ChangeSector (m_Sector, crush,
|
flag = P_ChangeSector (m_Sector, crush,
|
||||||
|
@ -230,7 +230,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush,
|
||||||
dest = -m_Sector->floorplane.d;
|
dest = -m_Sector->floorplane.d;
|
||||||
}
|
}
|
||||||
m_Sector->ceilingplane.ChangeHeight (-speed);
|
m_Sector->ceilingplane.ChangeHeight (-speed);
|
||||||
if (m_Sector->ceilingplane.d < dest)
|
if (m_Sector->ceilingplane.d <= dest)
|
||||||
{
|
{
|
||||||
m_Sector->ceilingplane.d = dest;
|
m_Sector->ceilingplane.d = dest;
|
||||||
flag = P_ChangeSector (m_Sector, crush,
|
flag = P_ChangeSector (m_Sector, crush,
|
||||||
|
@ -270,7 +270,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush,
|
||||||
case 1:
|
case 1:
|
||||||
// UP
|
// UP
|
||||||
m_Sector->ceilingplane.ChangeHeight (speed);
|
m_Sector->ceilingplane.ChangeHeight (speed);
|
||||||
if (m_Sector->ceilingplane.d > dest)
|
if (m_Sector->ceilingplane.d >= dest)
|
||||||
{
|
{
|
||||||
m_Sector->ceilingplane.d = dest;
|
m_Sector->ceilingplane.d = dest;
|
||||||
flag = P_ChangeSector (m_Sector, crush,
|
flag = P_ChangeSector (m_Sector, crush,
|
||||||
|
|
|
@ -195,8 +195,12 @@ void AArtiBlastRadius::BlastActor (AActor *victim, fixed_t strength)
|
||||||
|
|
||||||
if (victim->flags & MF_MISSILE)
|
if (victim->flags & MF_MISSILE)
|
||||||
{
|
{
|
||||||
victim->momz = 8*FRACUNIT;
|
// [RH] Floor and ceiling huggers should not be blasted vertically.
|
||||||
mo->momz = victim->momz;
|
if (!(victim->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
|
||||||
|
{
|
||||||
|
victim->momz = 8*FRACUNIT;
|
||||||
|
mo->momz = victim->momz;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -208,7 +212,14 @@ void AArtiBlastRadius::BlastActor (AActor *victim, fixed_t strength)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
victim->flags2 |= MF2_SLIDE | MF2_BLASTED;
|
if (victim->flags & MF_MISSILE)
|
||||||
|
{ // [RH] Missiles should not slide.
|
||||||
|
victim->flags2 |= MF2_BLASTED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
victim->flags2 |= MF2_SLIDE | MF2_BLASTED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,7 +442,6 @@ IMPLEMENT_ACTOR (AMinotaurFX3, Raven, -1, 0)
|
||||||
PROP_RadiusFixed (8)
|
PROP_RadiusFixed (8)
|
||||||
PROP_HeightFixed (16)
|
PROP_HeightFixed (16)
|
||||||
PROP_SpeedFixed (0)
|
PROP_SpeedFixed (0)
|
||||||
PROP_Flags3 (0)
|
|
||||||
|
|
||||||
PROP_SpawnState (S_MNTRFX3)
|
PROP_SpawnState (S_MNTRFX3)
|
||||||
|
|
||||||
|
|
|
@ -1153,6 +1153,10 @@ CCMD (printinv)
|
||||||
{
|
{
|
||||||
AInventory *item;
|
AInventory *item;
|
||||||
|
|
||||||
|
if (players[consoleplayer].mo == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (item = players[consoleplayer].mo->Inventory; item != NULL; item = item->Inventory)
|
for (item = players[consoleplayer].mo->Inventory; item != NULL; item = item->Inventory)
|
||||||
{
|
{
|
||||||
Printf ("%s #%lu (%d/%d)\n", item->GetClass()->Name+1, item->InventoryID, item->Amount, item->MaxAmount);
|
Printf ("%s #%lu (%d/%d)\n", item->GetClass()->Name+1, item->InventoryID, item->Amount, item->MaxAmount);
|
||||||
|
|
162
src/p_lnspec.cpp
162
src/p_lnspec.cpp
|
@ -1159,96 +1159,100 @@ FUNC(LS_Thing_Hate)
|
||||||
}
|
}
|
||||||
while (hater != NULL)
|
while (hater != NULL)
|
||||||
{
|
{
|
||||||
// If hating a group of things, record the TID and NULL
|
// Can't hate if can't attack.
|
||||||
// the target (if its TID doesn't match). A_Look will
|
if (hater->SeeState != NULL)
|
||||||
// find an appropriate thing to go chase after.
|
|
||||||
if (arg2 != 0)
|
|
||||||
{
|
{
|
||||||
hater->TIDtoHate = arg1;
|
// If hating a group of things, record the TID and NULL
|
||||||
hater->LastLook.Actor = NULL;
|
// the target (if its TID doesn't match). A_Look will
|
||||||
|
// find an appropriate thing to go chase after.
|
||||||
// If the TID to hate is 0, then don't forget the target and
|
if (arg2 != 0)
|
||||||
// lastenemy fields.
|
|
||||||
if (arg1 != 0)
|
|
||||||
{
|
{
|
||||||
if (hater->target != NULL && hater->target->tid != arg1)
|
hater->TIDtoHate = arg1;
|
||||||
|
hater->LastLook.Actor = NULL;
|
||||||
|
|
||||||
|
// If the TID to hate is 0, then don't forget the target and
|
||||||
|
// lastenemy fields.
|
||||||
|
if (arg1 != 0)
|
||||||
{
|
{
|
||||||
hater->target = NULL;
|
if (hater->target != NULL && hater->target->tid != arg1)
|
||||||
}
|
{
|
||||||
if (hater->lastenemy != NULL && hater->lastenemy->tid != arg1)
|
hater->target = NULL;
|
||||||
{
|
}
|
||||||
hater->lastenemy = NULL;
|
if (hater->lastenemy != NULL && hater->lastenemy->tid != arg1)
|
||||||
|
{
|
||||||
|
hater->lastenemy = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// Hate types for arg2:
|
||||||
// Hate types for arg2:
|
//
|
||||||
//
|
// 0 - Just hate one specific actor
|
||||||
// 0 - Just hate one specific actor
|
// 1 - Hate actors with given TID and attack players when shot
|
||||||
// 1 - Hate actors with given TID and attack players when shot
|
// 2 - Same as 1, but will go after enemies without seeing them first
|
||||||
// 2 - Same as 1, but will go after enemies without seeing them first
|
// 3 - Hunt actors with given TID and also players
|
||||||
// 3 - Hunt actors with given TID and also players
|
// 4 - Same as 3, but will go after monsters without seeing them first
|
||||||
// 4 - Same as 3, but will go after monsters without seeing them first
|
// 5 - Hate actors with given TID and ignore player attacks
|
||||||
// 5 - Hate actors with given TID and ignore player attacks
|
// 6 - Same as 5, but will go after enemies without seeing them first
|
||||||
// 6 - Same as 5, but will go after enemies without seeing them first
|
|
||||||
|
|
||||||
// Note here: If you use Thing_Hate (tid, 0, 2), you can make
|
// Note here: If you use Thing_Hate (tid, 0, 2), you can make
|
||||||
// a monster go after a player without seeing him first.
|
// a monster go after a player without seeing him first.
|
||||||
if (arg2 == 2 || arg2 == 4 || arg2 == 6)
|
if (arg2 == 2 || arg2 == 4 || arg2 == 6)
|
||||||
{
|
|
||||||
hater->flags3 |= MF3_NOSIGHTCHECK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hater->flags3 &= ~MF3_NOSIGHTCHECK;
|
|
||||||
}
|
|
||||||
if (arg2 == 3 || arg2 == 4)
|
|
||||||
{
|
|
||||||
hater->flags3 |= MF3_HUNTPLAYERS;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hater->flags3 &= ~MF3_HUNTPLAYERS;
|
|
||||||
}
|
|
||||||
if (arg2 == 5 || arg2 == 6)
|
|
||||||
{
|
|
||||||
hater->flags4 |= MF4_NOHATEPLAYERS;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hater->flags4 &= ~MF4_NOHATEPLAYERS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (arg1 == 0)
|
|
||||||
{
|
|
||||||
hatee = it;
|
|
||||||
}
|
|
||||||
else if (nothingToHate)
|
|
||||||
{
|
|
||||||
hatee = NULL;
|
|
||||||
}
|
|
||||||
else if (arg2 != 0)
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
hatee = hateeIt.Next ();
|
hater->flags3 |= MF3_NOSIGHTCHECK;
|
||||||
}
|
}
|
||||||
while ( hatee == NULL ||
|
else
|
||||||
hatee == hater || // can't hate self
|
|
||||||
!(hatee->flags & MF_SHOOTABLE) || // can't hate nonshootable things
|
|
||||||
hatee->health <= 0 || // can't hate dead things
|
|
||||||
(hatee->flags & MF2_DORMANT)); // can't target dormant things
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hatee != NULL && hatee != hater && (arg2 == 0 || (hater->goal != NULL && hater->target != hater->goal)))
|
|
||||||
{
|
|
||||||
if (hater->target)
|
|
||||||
{
|
{
|
||||||
hater->lastenemy = hater->target;
|
hater->flags3 &= ~MF3_NOSIGHTCHECK;
|
||||||
}
|
}
|
||||||
hater->target = hatee;
|
if (arg2 == 3 || arg2 == 4)
|
||||||
if (!(hater->flags2 & MF2_DORMANT))
|
|
||||||
{
|
{
|
||||||
hater->SetState (hater->SeeState);
|
hater->flags3 |= MF3_HUNTPLAYERS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hater->flags3 &= ~MF3_HUNTPLAYERS;
|
||||||
|
}
|
||||||
|
if (arg2 == 5 || arg2 == 6)
|
||||||
|
{
|
||||||
|
hater->flags4 |= MF4_NOHATEPLAYERS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hater->flags4 &= ~MF4_NOHATEPLAYERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arg1 == 0)
|
||||||
|
{
|
||||||
|
hatee = it;
|
||||||
|
}
|
||||||
|
else if (nothingToHate)
|
||||||
|
{
|
||||||
|
hatee = NULL;
|
||||||
|
}
|
||||||
|
else if (arg2 != 0)
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
hatee = hateeIt.Next ();
|
||||||
|
}
|
||||||
|
while ( hatee == NULL ||
|
||||||
|
hatee == hater || // can't hate self
|
||||||
|
!(hatee->flags & MF_SHOOTABLE) || // can't hate nonshootable things
|
||||||
|
hatee->health <= 0 || // can't hate dead things
|
||||||
|
(hatee->flags & MF2_DORMANT)); // can't target dormant things
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hatee != NULL && hatee != hater && (arg2 == 0 || (hater->goal != NULL && hater->target != hater->goal)))
|
||||||
|
{
|
||||||
|
if (hater->target)
|
||||||
|
{
|
||||||
|
hater->lastenemy = hater->target;
|
||||||
|
}
|
||||||
|
hater->target = hatee;
|
||||||
|
if (!(hater->flags2 & MF2_DORMANT))
|
||||||
|
{
|
||||||
|
hater->SetState (hater->SeeState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (arg0 != 0)
|
if (arg0 != 0)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
|
@ -396,7 +397,7 @@ void MessagePump (const SDL_Event &sev)
|
||||||
{
|
{
|
||||||
D_PostEvent (&event);
|
D_PostEvent (&event);
|
||||||
}
|
}
|
||||||
if (event.data2 >= 32 && event.subtype != EV_GUI_KeyUp)
|
if (!iscntrl(event.data2) && event.subtype != EV_GUI_KeyUp)
|
||||||
{
|
{
|
||||||
event.subtype = EV_GUI_Char;
|
event.subtype = EV_GUI_Char;
|
||||||
event.data1 = event.data2;
|
event.data1 = event.data2;
|
||||||
|
|
Loading…
Reference in a new issue