mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-21 19:31:14 +00:00
- Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
- Fixed: Even though P_DamageMobj checked an attack's originator for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack. - Fixed: A_MinotaurRoam should not assume without check that it was called by a MinotaurFriend. - Fixed: The Minotaur declared A_MntrFloorFire which it did not use. - Fixed: All Spawnspot functions did not check for a spot tid of 0 as the script's activator. - Fixed: Friendly monsters ignored team association of their owning players. SVN r1770 (trunk)
This commit is contained in:
parent
a5ec361715
commit
385350efae
9 changed files with 83 additions and 48 deletions
|
@ -1,4 +1,16 @@
|
||||||
August 11, 2009 (Changes by Graf Zahl)
|
August 12, 2009 (Changes by Graf Zahl)
|
||||||
|
- Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
|
||||||
|
- Fixed: Even though P_DamageMobj checked an attack's originator
|
||||||
|
for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack.
|
||||||
|
- Fixed: A_MinotaurRoam should not assume without check that it was
|
||||||
|
called by a MinotaurFriend.
|
||||||
|
- Fixed: The Minotaur declared A_MntrFloorFire which it did not use.
|
||||||
|
- Fixed: All Spawnspot functions did not check for a spot tid of 0 as
|
||||||
|
the script's activator.
|
||||||
|
- Fixed: Friendly monsters ignored team association of their owning
|
||||||
|
players.
|
||||||
|
|
||||||
|
August 11, 2009 (Changes by Graf Zahl)
|
||||||
- Fixed: The pause sprite was not centered correctly when it was a scaled
|
- Fixed: The pause sprite was not centered correctly when it was a scaled
|
||||||
graphic.
|
graphic.
|
||||||
|
|
||||||
|
@ -98,7 +110,7 @@ August 2, 2009 (Changes by Graf Zahl)
|
||||||
Misc1 variable were needed.
|
Misc1 variable were needed.
|
||||||
|
|
||||||
August 1, 2009
|
August 1, 2009
|
||||||
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
|
- Moved the target->velz assignment to the end of A_VileAttack to remove the
|
||||||
influence of vertical thrust from the radius attack, since ZDoom does
|
influence of vertical thrust from the radius attack, since ZDoom does
|
||||||
explosions in three dimensions, but Doom only did it in two.
|
explosions in three dimensions, but Doom only did it in two.
|
||||||
- Fixed: The last three parameters to A_VileAttack had their references off
|
- Fixed: The last three parameters to A_VileAttack had their references off
|
||||||
|
|
|
@ -657,7 +657,7 @@ void A_SorcOffense2(AActor *actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
index = actor->args[4] << 5;
|
index = actor->args[4] << 5;
|
||||||
actor->args[4] += 15;
|
actor->args[4] = (actor->args[4] + 15) & 255;
|
||||||
delta = (finesine[index])*SORCFX4_SPREAD_ANGLE;
|
delta = (finesine[index])*SORCFX4_SPREAD_ANGLE;
|
||||||
delta = (delta>>FRACBITS)*ANGLE_1;
|
delta = (delta>>FRACBITS)*ANGLE_1;
|
||||||
ang1 = actor->angle + delta;
|
ang1 = actor->angle + delta;
|
||||||
|
|
|
@ -464,34 +464,37 @@ void P_MinotaurSlam (AActor *source, AActor *target)
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam)
|
DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam)
|
||||||
{
|
{
|
||||||
AMinotaurFriend *self1 = static_cast<AMinotaurFriend *> (self);
|
|
||||||
|
|
||||||
// In case pain caused him to skip his fade in.
|
// In case pain caused him to skip his fade in.
|
||||||
self1->RenderStyle = STYLE_Normal;
|
self->RenderStyle = STYLE_Normal;
|
||||||
|
|
||||||
|
if (self->IsKindOf(RUNTIME_CLASS(AMinotaurFriend)))
|
||||||
|
{
|
||||||
|
AMinotaurFriend *self1 = static_cast<AMinotaurFriend *> (self);
|
||||||
|
|
||||||
if (self1->StartTime >= 0 && (level.maptime - self1->StartTime) >= MAULATORTICS)
|
if (self1->StartTime >= 0 && (level.maptime - self1->StartTime) >= MAULATORTICS)
|
||||||
{
|
{
|
||||||
P_DamageMobj (self1, NULL, NULL, TELEFRAG_DAMAGE, NAME_None);
|
P_DamageMobj (self1, NULL, NULL, TELEFRAG_DAMAGE, NAME_None);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pr_minotaurroam() < 30)
|
if (pr_minotaurroam() < 30)
|
||||||
CALL_ACTION(A_MinotaurLook, self1); // adjust to closest target
|
CALL_ACTION(A_MinotaurLook, self); // adjust to closest target
|
||||||
|
|
||||||
if (pr_minotaurroam() < 6)
|
if (pr_minotaurroam() < 6)
|
||||||
{
|
{
|
||||||
//Choose new direction
|
//Choose new direction
|
||||||
self1->movedir = pr_minotaurroam() % 8;
|
self->movedir = pr_minotaurroam() % 8;
|
||||||
FaceMovementDirection (self1);
|
FaceMovementDirection (self);
|
||||||
}
|
}
|
||||||
if (!P_Move(self1))
|
if (!P_Move(self))
|
||||||
{
|
{
|
||||||
// Turn
|
// Turn
|
||||||
if (pr_minotaurroam() & 1)
|
if (pr_minotaurroam() & 1)
|
||||||
self1->movedir = (++self1->movedir)%8;
|
self->movedir = (++self->movedir)%8;
|
||||||
else
|
else
|
||||||
self1->movedir = (self1->movedir+7)%8;
|
self->movedir = (self->movedir+7)%8;
|
||||||
FaceMovementDirection (self1);
|
FaceMovementDirection (self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_AcolyteDie)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
players[0].mo->GiveInventoryType (QuestItemClasses[6]);
|
players[i].mo->GiveInventoryType (QuestItemClasses[6]);
|
||||||
players[0].SetLogNumber (14);
|
players[i].SetLogNumber (14);
|
||||||
S_StopSound (CHAN_VOICE);
|
S_StopSound (CHAN_VOICE);
|
||||||
S_Sound (CHAN_VOICE, "svox/voc14", 1, ATTN_NORM);
|
S_Sound (CHAN_VOICE, "svox/voc14", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2276,27 +2276,43 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
|
||||||
|
|
||||||
int DLevelScript::DoSpawnSpot (int type, int spot, int tid, int angle, bool force)
|
int DLevelScript::DoSpawnSpot (int type, int spot, int tid, int angle, bool force)
|
||||||
{
|
{
|
||||||
|
int spawned = 0;
|
||||||
|
|
||||||
|
if (spot != 0)
|
||||||
|
{
|
||||||
FActorIterator iterator (spot);
|
FActorIterator iterator (spot);
|
||||||
AActor *aspot;
|
AActor *aspot;
|
||||||
int spawned = 0;
|
|
||||||
|
|
||||||
while ( (aspot = iterator.Next ()) )
|
while ( (aspot = iterator.Next ()) )
|
||||||
{
|
{
|
||||||
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, angle, force);
|
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, angle, force);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (activator != NULL)
|
||||||
|
{
|
||||||
|
spawned += DoSpawn (type, activator->x, activator->y, activator->z, tid, angle, force);
|
||||||
|
}
|
||||||
return spawned;
|
return spawned;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DLevelScript::DoSpawnSpotFacing (int type, int spot, int tid, bool force)
|
int DLevelScript::DoSpawnSpotFacing (int type, int spot, int tid, bool force)
|
||||||
{
|
{
|
||||||
|
int spawned = 0;
|
||||||
|
|
||||||
|
if (spot != 0)
|
||||||
|
{
|
||||||
FActorIterator iterator (spot);
|
FActorIterator iterator (spot);
|
||||||
AActor *aspot;
|
AActor *aspot;
|
||||||
int spawned = 0;
|
|
||||||
|
|
||||||
while ( (aspot = iterator.Next ()) )
|
while ( (aspot = iterator.Next ()) )
|
||||||
{
|
{
|
||||||
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, aspot->angle >> 24, force);
|
spawned += DoSpawn (type, aspot->x, aspot->y, aspot->z, tid, aspot->angle >> 24, force);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (activator != NULL)
|
||||||
|
{
|
||||||
|
spawned += DoSpawn (type, activator->x, activator->y, activator->z, tid, activator->angle >> 24, force);
|
||||||
|
}
|
||||||
return spawned;
|
return spawned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -713,8 +713,8 @@ protected:
|
||||||
static void SetLineTexture (int lineid, int side, int position, int name);
|
static void SetLineTexture (int lineid, int side, int position, int name);
|
||||||
static void ReplaceTextures (int fromname, int toname, int flags);
|
static void ReplaceTextures (int fromname, int toname, int flags);
|
||||||
static int DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, int angle, bool force);
|
static int DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, int angle, bool force);
|
||||||
static int DoSpawnSpot (int type, int spot, int tid, int angle, bool forced);
|
int DoSpawnSpot (int type, int spot, int tid, int angle, bool forced);
|
||||||
static int DoSpawnSpotFacing (int type, int spot, int tid, bool forced);
|
int DoSpawnSpotFacing (int type, int spot, int tid, bool forced);
|
||||||
int DoClassifyActor (int tid);
|
int DoClassifyActor (int tid);
|
||||||
int CallFunction(int argCount, int funcIndex, SDWORD *args);
|
int CallFunction(int argCount, int funcIndex, SDWORD *args);
|
||||||
|
|
||||||
|
|
|
@ -4063,6 +4063,8 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
|
||||||
if (bombdodamage && !(bombspot->flags3 & MF3_BLOODLESSIMPACT)) P_TraceBleed (damage, thing, bombspot);
|
if (bombdodamage && !(bombspot->flags3 & MF3_BLOODLESSIMPACT)) P_TraceBleed (damage, thing, bombspot);
|
||||||
|
|
||||||
if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST))
|
if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST))
|
||||||
|
{
|
||||||
|
if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST))
|
||||||
{
|
{
|
||||||
thrust = points * 0.5f / (float)thing->Mass;
|
thrust = points * 0.5f / (float)thing->Mass;
|
||||||
if (bombsource == thing)
|
if (bombsource == thing)
|
||||||
|
@ -4087,6 +4089,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// [RH] Old code just for barrels
|
// [RH] Old code just for barrels
|
||||||
|
|
|
@ -5160,7 +5160,8 @@ bool AActor::IsFriend (AActor *other)
|
||||||
return !deathmatch ||
|
return !deathmatch ||
|
||||||
FriendPlayer == other->FriendPlayer ||
|
FriendPlayer == other->FriendPlayer ||
|
||||||
FriendPlayer == 0 ||
|
FriendPlayer == 0 ||
|
||||||
other->FriendPlayer == 0;
|
other->FriendPlayer == 0 ||
|
||||||
|
players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5184,7 +5185,8 @@ bool AActor::IsHostile (AActor *other)
|
||||||
return deathmatch &&
|
return deathmatch &&
|
||||||
FriendPlayer != other->FriendPlayer &&
|
FriendPlayer != other->FriendPlayer &&
|
||||||
FriendPlayer !=0 &&
|
FriendPlayer !=0 &&
|
||||||
other->FriendPlayer != 0;
|
other->FriendPlayer != 0 &&
|
||||||
|
!players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ ACTOR Minotaur 9 native
|
||||||
action native A_MinotaurAtk2();
|
action native A_MinotaurAtk2();
|
||||||
action native A_MinotaurAtk3();
|
action native A_MinotaurAtk3();
|
||||||
action native A_MinotaurCharge();
|
action native A_MinotaurCharge();
|
||||||
action native A_MntrFloorFire();
|
|
||||||
action native A_MinotaurLook();
|
action native A_MinotaurLook();
|
||||||
action native A_MinotaurRoam();
|
action native A_MinotaurRoam();
|
||||||
action native A_MinotaurChase();
|
action native A_MinotaurChase();
|
||||||
|
|
Loading…
Reference in a new issue