mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
SVN r148 (trunk)
This commit is contained in:
parent
67da924a02
commit
96f6cfd18a
7 changed files with 32 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
|||
May 27, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: FString::FormatHelper must not alter the null string.
|
||||
- Fixed: FString::FormatHelper should use ReallocBuffer instead of directly
|
||||
calling Realloc. This caused crashes with the ACS print function.
|
||||
- Fixed: The dummy player spawned in G_FinishTravel must not start any ENTER
|
||||
scripts.
|
||||
|
||||
May 26, 2006
|
||||
- Changed makewad's zip routines so that it simply stores files that cannot be
|
||||
compressed smaller instead of using deflate anyway. Saves 133 bytes currently.
|
||||
|
|
|
@ -2004,7 +2004,11 @@ void G_FinishTravel ()
|
|||
else
|
||||
{
|
||||
oldpawn = pawndup;
|
||||
P_SpawnPlayer (&playerstarts[pawn->player - players]);
|
||||
|
||||
// The player being spawned here is a short lived dummy and
|
||||
// must not start any ENTER script or big problems will happen.
|
||||
P_SpawnPlayer (&playerstarts[pawn->player - players], false);
|
||||
|
||||
pawndup = pawn->player->mo;
|
||||
if (!startkeepfacing)
|
||||
{
|
||||
|
|
|
@ -90,7 +90,7 @@ void P_UnPredictPlayer ();
|
|||
extern fixed_t FloatBobOffsets[64];
|
||||
extern AActor *MissileActor;
|
||||
|
||||
void P_SpawnPlayer (mapthing2_t* mthing);
|
||||
void P_SpawnPlayer (mapthing2_t* mthing, bool startenterscripts = true);
|
||||
|
||||
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
|
||||
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
|
||||
|
|
|
@ -3292,7 +3292,7 @@ void AActor::AdjustFloorClip ()
|
|||
EXTERN_CVAR (Bool, chasedemo)
|
||||
extern bool demonew;
|
||||
|
||||
void P_SpawnPlayer (mapthing2_t *mthing)
|
||||
void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
||||
{
|
||||
int playernum;
|
||||
player_t *p;
|
||||
|
@ -3428,7 +3428,12 @@ void P_SpawnPlayer (mapthing2_t *mthing)
|
|||
p->cheats = CF_CHASECAM;
|
||||
|
||||
// setup gun psprite
|
||||
P_SetupPsprites (p);
|
||||
if (startenterscripts)
|
||||
{
|
||||
// This can also start a script so don't do it for
|
||||
// the dummy player.
|
||||
P_SetupPsprites (p);
|
||||
}
|
||||
|
||||
// give all cards in death match mode
|
||||
if (deathmatch)
|
||||
|
@ -3472,13 +3477,16 @@ void P_SpawnPlayer (mapthing2_t *mthing)
|
|||
P_PlayerStartStomp (mobj);
|
||||
|
||||
// [BC] Do script stuff
|
||||
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore))
|
||||
if (startenterscripts)
|
||||
{
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true);
|
||||
}
|
||||
else if (state == PST_REBORN)
|
||||
{
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true);
|
||||
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore))
|
||||
{
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true);
|
||||
}
|
||||
else if (state == PST_REBORN)
|
||||
{
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
#include "v_palette.h"
|
||||
#include "a_sharedglobal.h"
|
||||
|
||||
extern void P_SpawnPlayer (mapthing2_t *mthing);
|
||||
|
||||
static void CopyPlayer (player_t *dst, player_t *src, const char *name);
|
||||
static void ReadOnePlayer (FArchive &arc);
|
||||
static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNow);
|
||||
|
|
|
@ -218,9 +218,9 @@ int FString::FormatHelper (void *data, const char *cstr, int len)
|
|||
{
|
||||
FString *str = (FString *)data;
|
||||
size_t len1 = str->Len();
|
||||
if (len1 + len > str->Data()->AllocLen)
|
||||
if (len1 + len > str->Data()->AllocLen || str->Chars == &NullString.Nothing[0])
|
||||
{
|
||||
str->Chars = (char *)(str->Data()->Realloc((len1 + len + 127) & ~127) + 1);
|
||||
str->ReallocBuffer((len1 + len + 127) & ~127);
|
||||
}
|
||||
StrCopy (str->Chars + len1, cstr, len);
|
||||
str->Data()->Len = (unsigned int)(len1 + len);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Generated by re2c 0.10.3 on Wed May 24 23:26:39 2006 */
|
||||
/* Generated by re2c 0.10.3 on Sat May 27 10:44:26 2006 */
|
||||
#line 1 "scanner.re"
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
|
Loading…
Reference in a new issue