- Update to latest version in trunk.

SVN r3890 (scripting)
This commit is contained in:
Randy Heit 2012-10-17 04:24:54 +00:00
commit e7efa1d802
117 changed files with 2260 additions and 787 deletions

View file

@ -471,6 +471,29 @@ void PClassPlayerPawn::EnumColorSets(TArray<int> *out)
qsort(&(*out)[0], out->Size(), sizeof(int), intcmp);
}
//==========================================================================
//
//
//==========================================================================
bool PClassPlayerPawn::GetPainFlash(FName type, PalEntry *color) const
{
const PClassPlayerPawn *info = this;
while (info != NULL)
{
const PalEntry *flash = info->PainFlashes.CheckKey(type);
if (flash != NULL)
{
*color = *flash;
return true;
}
// Try parent class
info = dyn_cast<PClassPlayerPawn>(info->ParentClass);
}
return false;
}
//===========================================================================
//
// player_t :: SendPitchLimits
@ -523,6 +546,28 @@ void APlayerPawn::Serialize (FArchive &arc)
<< DamageFade
<< PlayerFlags
<< FlechetteType;
if (SaveVersion < 3829)
{
GruntSpeed = 12*FRACUNIT;
FallingScreamMinSpeed = 35*FRACUNIT;
FallingScreamMaxSpeed = 40*FRACUNIT;
}
else
{
arc << GruntSpeed << FallingScreamMinSpeed << FallingScreamMaxSpeed;
}
}
//===========================================================================
//
// APlayerPawn :: MarkPrecacheSounds
//
//===========================================================================
void APlayerPawn::MarkPrecacheSounds() const
{
Super::MarkPrecacheSounds();
S_MarkPlayerSounds(GetSoundClass());
}
//===========================================================================
@ -1018,7 +1063,7 @@ void APlayerPawn::FilterCoopRespawnInventory (APlayerPawn *oldplayer)
//
//===========================================================================
const char *APlayerPawn::GetSoundClass ()
const char *APlayerPawn::GetSoundClass() const
{
if (player != NULL &&
(player->mo == NULL || !(player->mo->flags4 &MF4_NOSKIN)) &&
@ -1679,7 +1724,11 @@ void P_CalcHeight (player_t *player)
// it causes bobbing jerkiness when the player moves from ice to non-ice,
// and vice-versa.
if ((player->mo->flags & MF_NOGRAVITY) && !onground)
if (player->cheats & CF_NOCLIP2)
{
player->bob = 0;
}
else if ((player->mo->flags & MF_NOGRAVITY) && !onground)
{
player->bob = FRACUNIT / 2;
}
@ -1804,7 +1853,7 @@ void P_MovePlayer (player_t *player)
mo->angle += cmd->ucmd.yaw << 16;
}
onground = (mo->z <= mo->floorz) || (mo->flags2 & MF2_ONMOBJ) || (mo->BounceFlags & BOUNCE_MBF);
onground = (mo->z <= mo->floorz) || (mo->flags2 & MF2_ONMOBJ) || (mo->BounceFlags & BOUNCE_MBF) || (player->cheats & CF_NOCLIP2);
// killough 10/98:
//
@ -2185,7 +2234,11 @@ void P_PlayerThink (player_t *player)
player->inventorytics--;
}
// No-clip cheat
if (player->cheats & CF_NOCLIP || (player->mo->GetDefault()->flags & MF_NOCLIP))
if ((player->cheats & (CF_NOCLIP | CF_NOCLIP2)) == CF_NOCLIP2)
{ // No noclip2 without noclip
player->cheats &= ~CF_NOCLIP2;
}
if (player->cheats & (CF_NOCLIP | CF_NOCLIP2) || (player->mo->GetDefault()->flags & MF_NOCLIP))
{
player->mo->flags |= MF_NOCLIP;
}
@ -2193,6 +2246,14 @@ void P_PlayerThink (player_t *player)
{
player->mo->flags &= ~MF_NOCLIP;
}
if (player->cheats & CF_NOCLIP2)
{
player->mo->flags |= MF_NOGRAVITY;
}
else if (!(player->mo->flags2 & MF2_FLY) && !(player->mo->GetDefault()->flags & MF_NOGRAVITY))
{
player->mo->flags &= ~MF_NOGRAVITY;
}
cmd = &player->cmd;
// Make unmodified copies for ACS's GetPlayerInput.
@ -2413,7 +2474,7 @@ void P_PlayerThink (player_t *player)
{
cmd->ucmd.upmove = ksgn (cmd->ucmd.upmove) * 0x300;
}
if (player->mo->waterlevel >= 2 || (player->mo->flags2 & MF2_FLY))
if (player->mo->waterlevel >= 2 || (player->mo->flags2 & MF2_FLY) || (player->cheats & CF_NOCLIP2))
{
player->mo->velz = cmd->ucmd.upmove << 9;
if (player->mo->waterlevel < 2 && !(player->mo->flags & MF_NOGRAVITY))
@ -2447,8 +2508,8 @@ void P_PlayerThink (player_t *player)
P_PlayerInSpecialSector (player);
}
P_PlayerOnSpecialFlat (player, P_GetThingFloorType (player->mo));
if (player->mo->velz <= -35*FRACUNIT &&
player->mo->velz >= -40*FRACUNIT && !player->morphTics &&
if (player->mo->velz <= -player->mo->FallingScreamMinSpeed &&
player->mo->velz >= -player->mo->FallingScreamMaxSpeed && !player->morphTics &&
player->mo->waterlevel == 0)
{
int id = S_FindSkinnedSound (player->mo, "*falling");
@ -2531,7 +2592,7 @@ void P_PlayerThink (player_t *player)
{
if (player->mo->waterlevel < 3 ||
(player->mo->flags2 & MF2_INVULNERABLE) ||
(player->cheats & CF_GODMODE))
(player->cheats & (CF_GODMODE | CF_NOCLIP2)))
{
player->mo->ResetAirSupply ();
}
@ -2763,6 +2824,14 @@ void player_t::Serialize (FArchive &arc)
{
cheats &= ~(1 << 17); // make sure old CF_REGENERATION bit is cleared
}
if (SaveVersion >= 3780)
{
arc << settings_controller;
}
else
{
settings_controller = (this - players == Net_Arbitrator);
}
if (isbot)
{