- Sync scriptbranch with trunk.
SVN r2269 (scripting)
This commit is contained in:
commit
42ac75e894
127 changed files with 2532 additions and 958 deletions
|
|
@ -270,8 +270,12 @@ void AActor::Serialize (FArchive &arc)
|
|||
<< ActiveSound
|
||||
<< UseSound
|
||||
<< BounceSound
|
||||
<< WallBounceSound
|
||||
<< Speed
|
||||
<< WallBounceSound;
|
||||
if (SaveVersion >= 2234)
|
||||
{
|
||||
arc << CrushPainSound;
|
||||
}
|
||||
arc << Speed
|
||||
<< FloatSpeed
|
||||
<< Mass
|
||||
<< PainChance
|
||||
|
|
@ -1069,7 +1073,7 @@ bool AActor::Grind(bool items)
|
|||
if (isgeneric) // Not a custom crush state, so colorize it appropriately.
|
||||
{
|
||||
S_Sound (this, CHAN_BODY, "misc/fallingsplat", 1, ATTN_IDLE);
|
||||
PalEntry bloodcolor = GetClass()->BloodColor;
|
||||
PalEntry bloodcolor = GetBloodColor();
|
||||
if (bloodcolor!=0) Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1113,7 +1117,7 @@ bool AActor::Grind(bool items)
|
|||
}
|
||||
S_Sound (this, CHAN_BODY, "misc/fallingsplat", 1, ATTN_IDLE);
|
||||
|
||||
PalEntry bloodcolor = GetClass()->BloodColor;
|
||||
PalEntry bloodcolor = GetBloodColor();
|
||||
if (bloodcolor!=0) gib->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
|
||||
}
|
||||
if (flags & MF_ICECORPSE)
|
||||
|
|
@ -2129,8 +2133,9 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
{
|
||||
fixed_t dist;
|
||||
fixed_t delta;
|
||||
fixed_t oldz = mo->z;
|
||||
|
||||
fixed_t oldz = mo->z;
|
||||
fixed_t grav = mo->GetGravity();
|
||||
|
||||
//
|
||||
// check for smooth step up
|
||||
//
|
||||
|
|
@ -2155,8 +2160,6 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
if (!mo->waterlevel || mo->flags & MF_CORPSE || (mo->player &&
|
||||
!(mo->player->cmd.ucmd.forwardmove | mo->player->cmd.ucmd.sidemove)))
|
||||
{
|
||||
fixed_t grav = mo->GetGravity();
|
||||
|
||||
// [RH] Double gravity only if running off a ledge. Coming down from
|
||||
// an upward thrust (e.g. a jump) should not double it.
|
||||
if (mo->velz == 0 && oldfloorz > mo->floorz && mo->z == oldfloorz)
|
||||
|
|
@ -2230,12 +2233,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
// teleported the actor so it is no longer below the floor.
|
||||
if (mo->z <= mo->floorz)
|
||||
{
|
||||
// old code for boss cube disabled
|
||||
//if ((mo->flags & MF_MISSILE) && (!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP)))
|
||||
|
||||
// We can't remove this completely because it was abused by some DECORATE definitions
|
||||
// (e.g. the monster pack's Afrit)
|
||||
if ((mo->flags & MF_MISSILE) && ((mo->flags & MF_NOGRAVITY) || !(mo->flags & MF_NOCLIP)))
|
||||
if ((mo->flags & MF_MISSILE) && !(mo->flags & MF_NOCLIP))
|
||||
{
|
||||
mo->z = mo->floorz;
|
||||
if (mo->BounceFlags & BOUNCE_Floors)
|
||||
|
|
@ -2297,7 +2295,10 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
mo->HitFloor ();
|
||||
if (mo->player)
|
||||
{
|
||||
mo->player->jumpTics = 7; // delay any jumping for a short while
|
||||
if (mo->player->jumpTics != 0 && mo->velz < -grav*4)
|
||||
{ // delay any jumping for a short while
|
||||
mo->player->jumpTics = 7;
|
||||
}
|
||||
if (mo->velz < minvel && !(mo->flags & MF_NOGRAVITY))
|
||||
{
|
||||
// Squat down.
|
||||
|
|
@ -2346,8 +2347,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
|
|||
}
|
||||
if (mo->velz > 0)
|
||||
mo->velz = 0;
|
||||
if (mo->flags & MF_MISSILE)
|
||||
//&& (!(gameinfo.gametype & GAME_DoomChex) || !(mo->flags & MF_NOCLIP)))
|
||||
if ((mo->flags & MF_MISSILE) && !(mo->flags & MF_NOCLIP))
|
||||
{
|
||||
if (mo->flags3 & MF3_CEILINGHUGGER)
|
||||
{
|
||||
|
|
@ -2615,11 +2615,6 @@ void AActor::RemoveFromHash ()
|
|||
tid = 0;
|
||||
}
|
||||
|
||||
angle_t AActor::AngleIncrements ()
|
||||
{
|
||||
return ANGLE_45;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AActor :: GetMissileDamage
|
||||
|
|
@ -3022,7 +3017,7 @@ void AActor::Tick ()
|
|||
&& !players[i].enemy
|
||||
&& player ? !IsTeammate (players[i].mo) : true
|
||||
&& P_AproxDistance (players[i].mo->x-x, players[i].mo->y-y) < MAX_MONSTER_TARGET_DIST
|
||||
&& P_CheckSight (players[i].mo, this, 2))
|
||||
&& P_CheckSight (players[i].mo, this, SF_SEEPASTBLOCKEVERYTHING))
|
||||
{ //Probably a monster, so go kill it.
|
||||
players[i].enemy = this;
|
||||
}
|
||||
|
|
@ -3700,8 +3695,6 @@ void AActor::LevelSpawned ()
|
|||
{
|
||||
if (tics > 0 && !(flags4 & MF4_SYNCHRONIZED))
|
||||
tics = 1 + (pr_spawnmapthing() % tics);
|
||||
angle_t incs = AngleIncrements ();
|
||||
angle -= angle % incs;
|
||||
flags &= ~MF_DROPPED; // [RH] clear MF_DROPPED flag
|
||||
HandleSpawnFlags ();
|
||||
}
|
||||
|
|
@ -3960,7 +3953,15 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
|
|||
{
|
||||
spawn_x = mthing->x;
|
||||
spawn_y = mthing->y;
|
||||
spawn_angle = ANG45 * (mthing->angle/45);
|
||||
// Allow full angular precision but avoid roundoff errors for multiples of 45 degrees.
|
||||
if (mthing->angle % 45 != 0)
|
||||
{
|
||||
spawn_angle = mthing->angle * (ANG45 / 45);
|
||||
}
|
||||
else
|
||||
{
|
||||
spawn_angle = ANG45 * (mthing->angle / 45);
|
||||
}
|
||||
}
|
||||
|
||||
mobj = static_cast<APlayerPawn *>
|
||||
|
|
@ -3986,11 +3987,15 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
|
|||
p->userinfo.skin = R_FindSkin (skins[p->userinfo.skin].name, p->CurrentPlayerClass);
|
||||
StatusBar->SetFace (&skins[p->userinfo.skin]);
|
||||
|
||||
// [RH] Be sure the player has the right translation
|
||||
R_BuildPlayerTranslation (playernum);
|
||||
|
||||
// [RH] set color translations for player sprites
|
||||
mobj->Translation = TRANSLATION(TRANSLATION_Players,playernum);
|
||||
if (!(mobj->flags2 & MF2_DONTTRANSLATE))
|
||||
{
|
||||
// [RH] Be sure the player has the right translation
|
||||
R_BuildPlayerTranslation (playernum);
|
||||
|
||||
// [RH] set color translations for player sprites
|
||||
mobj->Translation = TRANSLATION(TRANSLATION_Players,playernum);
|
||||
}
|
||||
|
||||
mobj->angle = spawn_angle;
|
||||
mobj->pitch = mobj->roll = 0;
|
||||
|
|
@ -4506,8 +4511,8 @@ AActor *P_SpawnPuff (AActor *source, PClassActor *pufftype, fixed_t x, fixed_t y
|
|||
void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AActor *originator)
|
||||
{
|
||||
AActor *th;
|
||||
PalEntry bloodcolor = originator->GetClass()->BloodColor;
|
||||
PClassActor *bloodcls = PClass::FindActor(originator->GetClass()->BloodType);
|
||||
PalEntry bloodcolor = originator->GetBloodColor();
|
||||
PClassActor *bloodcls = originator->GetBloodType();
|
||||
|
||||
int bloodtype = cl_bloodtype;
|
||||
|
||||
|
|
@ -4568,8 +4573,8 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc
|
|||
|
||||
void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
||||
{
|
||||
PalEntry bloodcolor = originator->GetClass()->BloodColor;
|
||||
PClassActor *bloodcls = PClass::FindActor(originator->GetClass()->BloodType2);
|
||||
PalEntry bloodcolor = originator->GetBloodColor();
|
||||
PClassActor *bloodcls = originator->GetBloodType(1);
|
||||
|
||||
int bloodtype = cl_bloodtype;
|
||||
|
||||
|
|
@ -4606,8 +4611,8 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
|||
|
||||
void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
||||
{
|
||||
PalEntry bloodcolor = originator->GetClass()->BloodColor;
|
||||
PClassActor *bloodcls = PClass::FindActor(originator->GetClass()->BloodType3);
|
||||
PalEntry bloodcolor = originator->GetBloodColor();
|
||||
PClassActor *bloodcls = originator->GetBloodType(2);
|
||||
|
||||
int bloodtype = cl_bloodtype;
|
||||
|
||||
|
|
@ -4645,8 +4650,8 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
|||
void P_RipperBlood (AActor *mo, AActor *bleeder)
|
||||
{
|
||||
fixed_t x, y, z;
|
||||
PalEntry bloodcolor = bleeder->GetClass()->BloodColor;
|
||||
PClassActor *bloodcls = PClass::FindActor(bleeder->GetClass()->BloodType);
|
||||
PalEntry bloodcolor = bleeder->GetBloodColor();
|
||||
PClassActor *bloodcls = bleeder->GetBloodType();
|
||||
|
||||
x = mo->x + (pr_ripperblood.Random2 () << 12);
|
||||
y = mo->y + (pr_ripperblood.Random2 () << 12);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue