mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +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
|
||||
- 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: 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
|
||||
|
|
|
@ -172,7 +172,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush,
|
|||
dest = -m_Sector->ceilingplane.d;
|
||||
}
|
||||
m_Sector->floorplane.ChangeHeight (speed);
|
||||
if (m_Sector->floorplane.d < dest)
|
||||
if (m_Sector->floorplane.d <= dest)
|
||||
{
|
||||
m_Sector->floorplane.d = dest;
|
||||
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;
|
||||
}
|
||||
m_Sector->ceilingplane.ChangeHeight (-speed);
|
||||
if (m_Sector->ceilingplane.d < dest)
|
||||
if (m_Sector->ceilingplane.d <= dest)
|
||||
{
|
||||
m_Sector->ceilingplane.d = dest;
|
||||
flag = P_ChangeSector (m_Sector, crush,
|
||||
|
@ -270,7 +270,7 @@ DMover::EResult DMover::MovePlane (fixed_t speed, fixed_t dest, int crush,
|
|||
case 1:
|
||||
// UP
|
||||
m_Sector->ceilingplane.ChangeHeight (speed);
|
||||
if (m_Sector->ceilingplane.d > dest)
|
||||
if (m_Sector->ceilingplane.d >= dest)
|
||||
{
|
||||
m_Sector->ceilingplane.d = dest;
|
||||
flag = P_ChangeSector (m_Sector, crush,
|
||||
|
|
|
@ -195,8 +195,12 @@ void AArtiBlastRadius::BlastActor (AActor *victim, fixed_t strength)
|
|||
|
||||
if (victim->flags & MF_MISSILE)
|
||||
{
|
||||
victim->momz = 8*FRACUNIT;
|
||||
mo->momz = victim->momz;
|
||||
// [RH] Floor and ceiling huggers should not be blasted vertically.
|
||||
if (!(victim->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
|
||||
{
|
||||
victim->momz = 8*FRACUNIT;
|
||||
mo->momz = victim->momz;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -208,7 +212,14 @@ void AArtiBlastRadius::BlastActor (AActor *victim, fixed_t strength)
|
|||
}
|
||||
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_HeightFixed (16)
|
||||
PROP_SpeedFixed (0)
|
||||
PROP_Flags3 (0)
|
||||
|
||||
PROP_SpawnState (S_MNTRFX3)
|
||||
|
||||
|
|
|
@ -1153,6 +1153,10 @@ CCMD (printinv)
|
|||
{
|
||||
AInventory *item;
|
||||
|
||||
if (players[consoleplayer].mo == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
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);
|
||||
|
|
162
src/p_lnspec.cpp
162
src/p_lnspec.cpp
|
@ -1159,96 +1159,100 @@ FUNC(LS_Thing_Hate)
|
|||
}
|
||||
while (hater != NULL)
|
||||
{
|
||||
// If hating a group of things, record the TID and NULL
|
||||
// the target (if its TID doesn't match). A_Look will
|
||||
// find an appropriate thing to go chase after.
|
||||
if (arg2 != 0)
|
||||
// Can't hate if can't attack.
|
||||
if (hater->SeeState != NULL)
|
||||
{
|
||||
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)
|
||||
// If hating a group of things, record the TID and NULL
|
||||
// the target (if its TID doesn't match). A_Look will
|
||||
// find an appropriate thing to go chase after.
|
||||
if (arg2 != 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->lastenemy != NULL && hater->lastenemy->tid != arg1)
|
||||
{
|
||||
hater->lastenemy = NULL;
|
||||
if (hater->target != NULL && hater->target->tid != arg1)
|
||||
{
|
||||
hater->target = NULL;
|
||||
}
|
||||
if (hater->lastenemy != NULL && hater->lastenemy->tid != arg1)
|
||||
{
|
||||
hater->lastenemy = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hate types for arg2:
|
||||
//
|
||||
// 0 - Just hate one specific actor
|
||||
// 1 - Hate actors with given TID and attack players when shot
|
||||
// 2 - Same as 1, but will go after enemies without seeing them first
|
||||
// 3 - Hunt actors with given TID and also players
|
||||
// 4 - Same as 3, but will go after monsters without seeing them first
|
||||
// 5 - Hate actors with given TID and ignore player attacks
|
||||
// 6 - Same as 5, but will go after enemies without seeing them first
|
||||
// Hate types for arg2:
|
||||
//
|
||||
// 0 - Just hate one specific actor
|
||||
// 1 - Hate actors with given TID and attack players when shot
|
||||
// 2 - Same as 1, but will go after enemies without seeing them first
|
||||
// 3 - Hunt actors with given TID and also players
|
||||
// 4 - Same as 3, but will go after monsters without seeing them first
|
||||
// 5 - Hate actors with given TID and ignore player attacks
|
||||
// 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
|
||||
// a monster go after a player without seeing him first.
|
||||
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
|
||||
// Note here: If you use Thing_Hate (tid, 0, 2), you can make
|
||||
// a monster go after a player without seeing him first.
|
||||
if (arg2 == 2 || arg2 == 4 || arg2 == 6)
|
||||
{
|
||||
hatee = hateeIt.Next ();
|
||||
hater->flags3 |= MF3_NOSIGHTCHECK;
|
||||
}
|
||||
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)
|
||||
else
|
||||
{
|
||||
hater->lastenemy = hater->target;
|
||||
hater->flags3 &= ~MF3_NOSIGHTCHECK;
|
||||
}
|
||||
hater->target = hatee;
|
||||
if (!(hater->flags2 & MF2_DORMANT))
|
||||
if (arg2 == 3 || arg2 == 4)
|
||||
{
|
||||
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)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <SDL.h>
|
||||
#include <ctype.h>
|
||||
#include "doomtype.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "doomdef.h"
|
||||
|
@ -396,7 +397,7 @@ void MessagePump (const SDL_Event &sev)
|
|||
{
|
||||
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.data1 = event.data2;
|
||||
|
|
Loading…
Reference in a new issue