2008-01-27 11:25:03 +00:00
|
|
|
// Emacs style mode select -*- C++ -*-
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id:$
|
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
// $Log:$
|
|
|
|
//
|
|
|
|
// DESCRIPTION: none
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <time.h>
|
2009-09-10 22:20:46 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
#include <CoreServices/CoreServices.h>
|
|
|
|
#endif
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
#include "templates.h"
|
|
|
|
#include "version.h"
|
|
|
|
#include "doomdef.h"
|
|
|
|
#include "doomstat.h"
|
|
|
|
#include "d_protocol.h"
|
|
|
|
#include "d_netinf.h"
|
|
|
|
#include "f_finale.h"
|
|
|
|
#include "m_argv.h"
|
|
|
|
#include "m_misc.h"
|
|
|
|
#include "m_menu.h"
|
|
|
|
#include "m_random.h"
|
|
|
|
#include "m_crc32.h"
|
|
|
|
#include "i_system.h"
|
2009-06-24 22:19:34 +00:00
|
|
|
#include "i_input.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
#include "p_saveg.h"
|
|
|
|
#include "p_tick.h"
|
|
|
|
#include "d_main.h"
|
|
|
|
#include "wi_stuff.h"
|
|
|
|
#include "hu_stuff.h"
|
|
|
|
#include "st_stuff.h"
|
|
|
|
#include "am_map.h"
|
|
|
|
#include "c_console.h"
|
|
|
|
#include "c_cvars.h"
|
|
|
|
#include "c_bind.h"
|
|
|
|
#include "c_dispatch.h"
|
|
|
|
#include "v_video.h"
|
|
|
|
#include "w_wad.h"
|
|
|
|
#include "p_local.h"
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "gstrings.h"
|
|
|
|
#include "r_data.h"
|
|
|
|
#include "r_sky.h"
|
|
|
|
#include "r_draw.h"
|
|
|
|
#include "g_game.h"
|
|
|
|
#include "g_level.h"
|
|
|
|
#include "b_bot.h" //Added by MC:
|
|
|
|
#include "sbar.h"
|
|
|
|
#include "m_swap.h"
|
|
|
|
#include "m_png.h"
|
|
|
|
#include "gi.h"
|
|
|
|
#include "a_keys.h"
|
|
|
|
#include "a_artifacts.h"
|
|
|
|
#include "r_translate.h"
|
2008-09-15 23:47:00 +00:00
|
|
|
#include "cmdlib.h"
|
|
|
|
#include "d_net.h"
|
|
|
|
#include "d_event.h"
|
2009-02-05 00:06:30 +00:00
|
|
|
#include "p_acs.h"
|
2009-07-11 07:17:20 +00:00
|
|
|
#include "m_joy.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
#include <zlib.h>
|
|
|
|
|
|
|
|
#include "g_hub.h"
|
|
|
|
|
|
|
|
|
|
|
|
static FRandom pr_dmspawn ("DMSpawn");
|
|
|
|
|
|
|
|
const int SAVEPICWIDTH = 216;
|
|
|
|
const int SAVEPICHEIGHT = 162;
|
|
|
|
|
|
|
|
bool G_CheckDemoStatus (void);
|
|
|
|
void G_ReadDemoTiccmd (ticcmd_t *cmd, int player);
|
|
|
|
void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf);
|
|
|
|
void G_PlayerReborn (int player);
|
|
|
|
|
|
|
|
void G_DoNewGame (void);
|
|
|
|
void G_DoLoadGame (void);
|
|
|
|
void G_DoPlayDemo (void);
|
|
|
|
void G_DoCompleted (void);
|
|
|
|
void G_DoVictory (void);
|
|
|
|
void G_DoWorldDone (void);
|
2008-02-14 13:07:19 +00:00
|
|
|
void G_DoSaveGame (bool okForQuicksave, FString filename, const char *description);
|
2008-01-27 11:25:03 +00:00
|
|
|
void G_DoAutoSave ();
|
|
|
|
|
|
|
|
FIntCVar gameskill ("skill", 2, CVAR_SERVERINFO|CVAR_LATCH);
|
|
|
|
CVAR (Int, deathmatch, 0, CVAR_SERVERINFO|CVAR_LATCH);
|
|
|
|
CVAR (Bool, chasedemo, false, 0);
|
|
|
|
CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
2008-02-20 16:51:40 +00:00
|
|
|
CVAR (Bool, longsavemessages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
CVAR (String, save_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
2009-09-15 06:19:39 +00:00
|
|
|
EXTERN_CVAR (Float, con_midtime);
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// CVAR displaynametags
|
|
|
|
//
|
|
|
|
// Selects whether to display name tags or not when changing weapons
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
CUSTOM_CVAR (Bool, displaynametags, 0, CVAR_ARCHIVE)
|
|
|
|
{
|
|
|
|
if (self != 0 && self != 1)
|
|
|
|
{
|
|
|
|
self = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
gameaction_t gameaction;
|
|
|
|
gamestate_t gamestate = GS_STARTUP;
|
|
|
|
|
|
|
|
int paused;
|
|
|
|
bool sendpause; // send a pause event next tic
|
|
|
|
bool sendsave; // send a save event next tic
|
|
|
|
bool sendturn180; // [RH] send a 180 degree turn next tic
|
|
|
|
bool usergame; // ok to save / end game
|
|
|
|
bool insave; // Game is saving - used to block exit commands
|
|
|
|
|
|
|
|
bool timingdemo; // if true, exit with report on completion
|
|
|
|
bool nodrawers; // for comparative timing purposes
|
|
|
|
bool noblit; // for comparative timing purposes
|
|
|
|
|
|
|
|
bool viewactive;
|
|
|
|
|
|
|
|
bool netgame; // only true if packets are broadcast
|
|
|
|
bool multiplayer;
|
|
|
|
player_t players[MAXPLAYERS];
|
|
|
|
bool playeringame[MAXPLAYERS];
|
|
|
|
|
|
|
|
int consoleplayer; // player taking events
|
|
|
|
int gametic;
|
|
|
|
|
|
|
|
CVAR(Bool, demo_compress, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
|
|
|
char demoname[256];
|
|
|
|
bool demorecording;
|
|
|
|
bool demoplayback;
|
|
|
|
bool netdemo;
|
|
|
|
bool demonew; // [RH] Only used around G_InitNew for demos
|
|
|
|
int demover;
|
|
|
|
BYTE* demobuffer;
|
|
|
|
BYTE* demo_p;
|
|
|
|
BYTE* democompspot;
|
|
|
|
BYTE* demobodyspot;
|
|
|
|
size_t maxdemosize;
|
|
|
|
BYTE* zdemformend; // end of FORM ZDEM chunk
|
|
|
|
BYTE* zdembodyend; // end of ZDEM BODY chunk
|
|
|
|
bool singledemo; // quit after playing a demo from cmdline
|
|
|
|
|
|
|
|
bool precache = true; // if true, load all graphics at start
|
|
|
|
|
|
|
|
wbstartstruct_t wminfo; // parms for world map / intermission
|
|
|
|
|
|
|
|
short consistancy[MAXPLAYERS][BACKUPTICS];
|
|
|
|
|
|
|
|
BYTE* savebuffer;
|
|
|
|
|
|
|
|
|
|
|
|
#define MAXPLMOVE (forwardmove[1])
|
|
|
|
|
|
|
|
#define TURBOTHRESHOLD 12800
|
|
|
|
|
|
|
|
float normforwardmove[2] = {0x19, 0x32}; // [RH] For setting turbo from console
|
|
|
|
float normsidemove[2] = {0x18, 0x28}; // [RH] Ditto
|
|
|
|
|
|
|
|
fixed_t forwardmove[2], sidemove[2];
|
|
|
|
fixed_t angleturn[4] = {640, 1280, 320, 320}; // + slow turn
|
|
|
|
fixed_t flyspeed[2] = {1*256, 3*256};
|
|
|
|
int lookspeed[2] = {450, 512};
|
|
|
|
|
|
|
|
#define SLOWTURNTICS 6
|
|
|
|
|
|
|
|
CVAR (Bool, cl_run, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) // Always run?
|
|
|
|
CVAR (Bool, invertmouse, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) // Invert mouse look down/up?
|
|
|
|
CVAR (Bool, freelook, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) // Always mlook?
|
|
|
|
CVAR (Bool, lookstrafe, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) // Always strafe with mouse?
|
|
|
|
CVAR (Float, m_pitch, 1.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE) // Mouse speeds
|
|
|
|
CVAR (Float, m_yaw, 1.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|
|
|
CVAR (Float, m_forward, 1.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|
|
|
CVAR (Float, m_side, 2.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|
|
|
|
|
|
|
int turnheld; // for accelerative turning
|
|
|
|
|
|
|
|
// mouse values are used once
|
|
|
|
int mousex;
|
|
|
|
int mousey;
|
|
|
|
|
|
|
|
FString savegamefile;
|
|
|
|
char savedescription[SAVESTRINGSIZE];
|
|
|
|
|
|
|
|
// [RH] Name of screenshot file to generate (usually NULL)
|
|
|
|
FString shotfile;
|
|
|
|
|
|
|
|
AActor* bodyque[BODYQUESIZE];
|
|
|
|
int bodyqueslot;
|
|
|
|
|
|
|
|
void R_ExecuteSetViewSize (void);
|
|
|
|
|
|
|
|
FString savename;
|
|
|
|
FString BackupSaveName;
|
|
|
|
|
|
|
|
bool SendLand;
|
|
|
|
const AInventory *SendItemUse, *SendItemDrop;
|
|
|
|
|
|
|
|
EXTERN_CVAR (Int, team)
|
|
|
|
|
|
|
|
CVAR (Bool, teamplay, false, CVAR_SERVERINFO)
|
|
|
|
|
|
|
|
// [RH] Allow turbo setting anytime during game
|
|
|
|
CUSTOM_CVAR (Float, turbo, 100.f, 0)
|
|
|
|
{
|
|
|
|
if (self < 10.f)
|
|
|
|
{
|
|
|
|
self = 10.f;
|
|
|
|
}
|
|
|
|
else if (self > 256.f)
|
|
|
|
{
|
|
|
|
self = 256.f;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-07-04 16:54:29 +00:00
|
|
|
double scale = self * 0.01;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
forwardmove[0] = (int)(normforwardmove[0]*scale);
|
|
|
|
forwardmove[1] = (int)(normforwardmove[1]*scale);
|
|
|
|
sidemove[0] = (int)(normsidemove[0]*scale);
|
|
|
|
sidemove[1] = (int)(normsidemove[1]*scale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (turnspeeds)
|
|
|
|
{
|
|
|
|
if (argv.argc() == 1)
|
|
|
|
{
|
|
|
|
Printf ("Current turn speeds: %d %d %d %d\n", angleturn[0],
|
|
|
|
angleturn[1], angleturn[2], angleturn[3]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 1; i <= 4 && i < argv.argc(); ++i)
|
|
|
|
{
|
|
|
|
angleturn[i-1] = atoi (argv[i]);
|
|
|
|
}
|
|
|
|
if (i <= 2)
|
|
|
|
{
|
|
|
|
angleturn[1] = angleturn[0] * 2;
|
|
|
|
}
|
|
|
|
if (i <= 3)
|
|
|
|
{
|
|
|
|
angleturn[2] = angleturn[0] / 2;
|
|
|
|
}
|
|
|
|
if (i <= 4)
|
|
|
|
{
|
|
|
|
angleturn[3] = angleturn[2];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (slot)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1)
|
|
|
|
{
|
|
|
|
int slot = atoi (argv[1]);
|
|
|
|
|
|
|
|
if (slot < NUM_WEAPON_SLOTS)
|
|
|
|
{
|
2009-02-21 17:07:32 +00:00
|
|
|
SendItemUse = players[consoleplayer].weapons.Slots[slot].PickWeapon (&players[consoleplayer]);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (centerview)
|
|
|
|
{
|
|
|
|
Net_WriteByte (DEM_CENTERVIEW);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD(crouch)
|
|
|
|
{
|
|
|
|
Net_WriteByte(DEM_CROUCH);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (land)
|
|
|
|
{
|
|
|
|
SendLand = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (pause)
|
|
|
|
{
|
|
|
|
sendpause = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (turn180)
|
|
|
|
{
|
|
|
|
sendturn180 = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (weapnext)
|
|
|
|
{
|
2009-02-21 17:07:32 +00:00
|
|
|
SendItemUse = players[consoleplayer].weapons.PickNextWeapon (&players[consoleplayer]);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (weapprev)
|
|
|
|
{
|
2009-02-21 17:07:32 +00:00
|
|
|
SendItemUse = players[consoleplayer].weapons.PickPrevWeapon (&players[consoleplayer]);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (invnext)
|
|
|
|
{
|
|
|
|
AInventory *next;
|
|
|
|
|
|
|
|
if (who == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (who->InvSel != NULL)
|
|
|
|
{
|
|
|
|
if ((next = who->InvSel->NextInv()) != NULL)
|
|
|
|
{
|
|
|
|
who->InvSel = next;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Select the first item in the inventory
|
|
|
|
if (!(who->Inventory->ItemFlags & IF_INVBAR))
|
|
|
|
{
|
|
|
|
who->InvSel = who->Inventory->NextInv();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
who->InvSel = who->Inventory;
|
|
|
|
}
|
|
|
|
}
|
2009-09-15 06:19:39 +00:00
|
|
|
if (displaynametags && StatusBar && SmallFont
|
|
|
|
&& gamestate == GS_LEVEL && level.time > con_midtime && who->InvSel)
|
|
|
|
StatusBar->AttachMessage (new DHUDMessage (SmallFont, who->InvSel->GetTag(),
|
|
|
|
2.5f, 0.375f, 0, 0, CR_YELLOW, con_midtime), MAKE_ID('S','I','N','V'));
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
who->player->inventorytics = 5*TICRATE;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (invprev)
|
|
|
|
{
|
|
|
|
AInventory *item, *newitem;
|
|
|
|
|
|
|
|
if (who == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (who->InvSel != NULL)
|
|
|
|
{
|
|
|
|
if ((item = who->InvSel->PrevInv()) != NULL)
|
|
|
|
{
|
|
|
|
who->InvSel = item;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Select the last item in the inventory
|
|
|
|
item = who->InvSel;
|
|
|
|
while ((newitem = item->NextInv()) != NULL)
|
|
|
|
{
|
|
|
|
item = newitem;
|
|
|
|
}
|
|
|
|
who->InvSel = item;
|
|
|
|
}
|
2009-09-15 06:19:39 +00:00
|
|
|
if (displaynametags && StatusBar && SmallFont
|
|
|
|
&& gamestate == GS_LEVEL && level.time > con_midtime && who->InvSel)
|
|
|
|
StatusBar->AttachMessage (new DHUDMessage (SmallFont, who->InvSel->GetTag(),
|
|
|
|
2.5f, 0.375f, 0, 0, CR_YELLOW, con_midtime), MAKE_ID('S','I','N','V'));
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
who->player->inventorytics = 5*TICRATE;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (invuseall)
|
|
|
|
{
|
|
|
|
SendItemUse = (const AInventory *)1;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (invuse)
|
|
|
|
{
|
|
|
|
if (players[consoleplayer].inventorytics == 0 || gameinfo.gametype == GAME_Strife)
|
|
|
|
{
|
|
|
|
if (players[consoleplayer].mo) SendItemUse = players[consoleplayer].mo->InvSel;
|
|
|
|
}
|
|
|
|
players[consoleplayer].inventorytics = 0;
|
|
|
|
}
|
|
|
|
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
CCMD(invquery)
|
|
|
|
{
|
|
|
|
AInventory *inv = players[consoleplayer].mo->InvSel;
|
|
|
|
if (inv != NULL)
|
|
|
|
{
|
2009-09-15 06:19:39 +00:00
|
|
|
Printf(PRINT_HIGH, "%s (%dx)\n", inv->GetTag(), inv->Amount);
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
CCMD (use)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1 && who != NULL)
|
|
|
|
{
|
|
|
|
SendItemUse = who->FindInventory (PClass::FindClass (argv[1]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (invdrop)
|
|
|
|
{
|
|
|
|
if (players[consoleplayer].mo) SendItemDrop = players[consoleplayer].mo->InvSel;
|
|
|
|
}
|
|
|
|
|
2009-02-05 00:06:30 +00:00
|
|
|
CCMD (weapdrop)
|
|
|
|
{
|
|
|
|
SendItemDrop = players[consoleplayer].ReadyWeapon;
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
CCMD (drop)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1 && who != NULL)
|
|
|
|
{
|
|
|
|
SendItemDrop = who->FindInventory (PClass::FindClass (argv[1]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (useflechette)
|
|
|
|
{ // Select from one of arti_poisonbag1-3, whichever the player has
|
|
|
|
static const ENamedName bagnames[3] =
|
|
|
|
{
|
|
|
|
NAME_ArtiPoisonBag1,
|
|
|
|
NAME_ArtiPoisonBag2,
|
|
|
|
NAME_ArtiPoisonBag3
|
|
|
|
};
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
if (who == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (who->IsKindOf (PClass::FindClass (NAME_ClericPlayer)))
|
|
|
|
i = 0;
|
|
|
|
else if (who->IsKindOf (PClass::FindClass (NAME_MagePlayer)))
|
|
|
|
i = 1;
|
|
|
|
else
|
|
|
|
i = 2;
|
|
|
|
|
|
|
|
for (j = 0; j < 3; ++j)
|
|
|
|
{
|
|
|
|
AInventory *item;
|
|
|
|
if ( (item = who->FindInventory (bagnames[(i+j)%3])) )
|
|
|
|
{
|
|
|
|
SendItemUse = item;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (select)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1)
|
|
|
|
{
|
|
|
|
AInventory *item = who->FindInventory (PClass::FindClass (argv[1]));
|
|
|
|
if (item != NULL)
|
|
|
|
{
|
|
|
|
who->InvSel = item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
who->player->inventorytics = 5*TICRATE;
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1735:
- Added extra states to dehsupp for the MBF additions.
- Removed specific Button_Speed handling from the controllers' AddAxes()
methods. Analog axes now respond to Button_Speed and cl_run in exactly the
same way as digital buttons do.
- Changed rounding slightly for analog axis -> integer in G_BuildTiccmd().
- Fixed: FXInputController::ProcessThumbstick() was slightly off when it
converted to the range [-1.0,+1.0].
- Added default bindings for the Xbox 360 controller buttons.
- Fixed: Redefining an existing skill would set that skills ACSReturn to be
the same as the next new skill defined, if neither definition explicitly set
the value for ACSReturn.
- Added a DefaultSkill property. Adding it to a skill will cause that skill
to be the default one selected in the menu. If none is specified as the
default, then the middle skill is the default.
- Slider controls in the options menu now display their values
numerically next to the slider.
- The minimum value for m_yaw, m_pitch, m_forward, and m_side from the
menu has been dropped from 0.5 to 0, so those particular mouse motions can
be disabled entirely without using the console.
- added compat_anybossdeath to MAPINFO.
- fixed blue colormap
- Added parameters to A_VileAttack.
- Removed redundant definition of use_joystick from SDL/i_input.cpp.
- Turned net decompression into a non fatal error. It now drops the packet
and waits for the sender to send a new, hopefully good, packet.
- Reduced potential for overflow in R_ProjectSprite().
- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so
that additive time powerups can be activated before the existing
power has entered its blink threshold.
- Added a "BlueMap" for powerup colors.
- Added a NULL screen check when detaching HUD messages.
- Added HotWax's A_SetArg.
- Gez's patch for more A_WeaponReady flags:
* WRF_NOBOB (1): Weapon won't bob
* WRF_NOFIRE (12): Weapon won't fire at all
* WRF_NOSWITCH (2): Weapon can't be switched off
* WRF_NOPRIMARY (4): Weapon will not fire its main attack
* WRF_NOSECONDARY (8): Weapon will not fire its alt attack
- Attempt to add support for Microsoft's SideWinder Strategic Commander.
- Split the joystick menu into two parts: A top level with general options
and a list of all attached controllers, and a second level for configuring
an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
with an older DLL. This combination will now produce sound.
- added submission for raising master/children/siblings.
- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@402 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-24 13:47:25 +00:00
|
|
|
static inline int joyint(double val)
|
|
|
|
{
|
|
|
|
if (val >= 0)
|
|
|
|
{
|
|
|
|
return int(ceil(val));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return int(floor(val));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
//
|
|
|
|
// G_BuildTiccmd
|
|
|
|
// Builds a ticcmd from all of the available inputs
|
|
|
|
// or reads it from the demo buffer.
|
|
|
|
// If recording a demo, write it out
|
|
|
|
//
|
|
|
|
void G_BuildTiccmd (ticcmd_t *cmd)
|
|
|
|
{
|
|
|
|
int strafe;
|
|
|
|
int speed;
|
|
|
|
int forward;
|
|
|
|
int side;
|
|
|
|
int fly;
|
|
|
|
|
|
|
|
ticcmd_t *base;
|
|
|
|
|
|
|
|
base = I_BaseTiccmd (); // empty, or external driver
|
|
|
|
*cmd = *base;
|
|
|
|
|
|
|
|
cmd->consistancy = consistancy[consoleplayer][(maketic/ticdup)%BACKUPTICS];
|
|
|
|
|
|
|
|
strafe = Button_Strafe.bDown;
|
|
|
|
speed = Button_Speed.bDown ^ (int)cl_run;
|
|
|
|
|
|
|
|
forward = side = fly = 0;
|
|
|
|
|
|
|
|
// [RH] only use two stage accelerative turning on the keyboard
|
|
|
|
// and not the joystick, since we treat the joystick as
|
|
|
|
// the analog device it is.
|
|
|
|
if (Button_Left.bDown || Button_Right.bDown)
|
|
|
|
turnheld += ticdup;
|
|
|
|
else
|
|
|
|
turnheld = 0;
|
|
|
|
|
|
|
|
// let movement keys cancel each other out
|
|
|
|
if (strafe)
|
|
|
|
{
|
|
|
|
if (Button_Right.bDown)
|
|
|
|
side += sidemove[speed];
|
|
|
|
if (Button_Left.bDown)
|
|
|
|
side -= sidemove[speed];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int tspeed = speed;
|
|
|
|
|
|
|
|
if (turnheld < SLOWTURNTICS)
|
|
|
|
tspeed *= 2; // slow turn
|
|
|
|
|
|
|
|
if (Button_Right.bDown)
|
|
|
|
{
|
|
|
|
G_AddViewAngle (angleturn[tspeed]);
|
|
|
|
LocalKeyboardTurner = true;
|
|
|
|
}
|
|
|
|
if (Button_Left.bDown)
|
|
|
|
{
|
|
|
|
G_AddViewAngle (-angleturn[tspeed]);
|
|
|
|
LocalKeyboardTurner = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Button_LookUp.bDown)
|
|
|
|
G_AddViewPitch (lookspeed[speed]);
|
|
|
|
if (Button_LookDown.bDown)
|
|
|
|
G_AddViewPitch (-lookspeed[speed]);
|
|
|
|
|
|
|
|
if (Button_MoveUp.bDown)
|
|
|
|
fly += flyspeed[speed];
|
|
|
|
if (Button_MoveDown.bDown)
|
|
|
|
fly -= flyspeed[speed];
|
|
|
|
|
|
|
|
if (Button_Klook.bDown)
|
|
|
|
{
|
|
|
|
if (Button_Forward.bDown)
|
|
|
|
G_AddViewPitch (lookspeed[speed]);
|
|
|
|
if (Button_Back.bDown)
|
|
|
|
G_AddViewPitch (-lookspeed[speed]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (Button_Forward.bDown)
|
|
|
|
forward += forwardmove[speed];
|
|
|
|
if (Button_Back.bDown)
|
|
|
|
forward -= forwardmove[speed];
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Button_MoveRight.bDown)
|
|
|
|
side += sidemove[speed];
|
|
|
|
if (Button_MoveLeft.bDown)
|
|
|
|
side -= sidemove[speed];
|
|
|
|
|
|
|
|
// buttons
|
Update to ZDoom r1222
- Moved IF_ALWAYSPICKUP and GiveQuest into CallTryPickup so that they are
automatically used by all inventory classes.
- The previous change made it necessary to replace all TryPickup calls with
another function that just calls TryPickup.
- Fixed: AInventory::TryPickup can change the toucher so this must be reported
to subclasses calling the super function. Changed TryPickup to pass the
toucher pointer by reference.
- Prefixed all names of CQ decorations with Chex after seeing some conflicts
with PWADs.
- Removed Chex Quest actors that were just unaltered duplicates of Doom's.
- Added detection for Chex Quest 3 IWAD.
- Cleaned up M_QuitGame because the code was almost incomprehensible and I
wanted to add CQ3's new quit messages.
- Added Chex Quest obituaries and a few other messages from CQ3.
- Fixed: drawbar improperly clipped images when not in the top left quadrant.
- Fixed: Crouching no longer worked due to a bug introduced by the
player input code.
- Added GetPlayerInput() for examining a player's inputs from ACS. Most
buttons are now passed across the network, and there are four new user
buttons specifically for use with this command. Also defined +zoom
and +reload for future implementation.
- Fixed: Hexen's fourth weapon pieces did not play the correct pickup sound,
and when they were fully assembled, they did not play the sound across the
entire level.
- Antialiasing of lines is now controlled solely by the vid_hwaalines cvar,
ignoring what the driver reports, since ATI is apparently just as bad as
NVidia.
- Added a check for D3DLINECAPS_ANTIALIAS, but this is complicated by the
fact that NVidia's don't report it, even though they support it. If there
are any cards that no longer have antialised lines on the automap, please
let me know.
- Added vid_hwaalines cvar to force antialiased lines off for the
Direct3D renderer, in case it doesn't really support them.
- Fixed: The new rolloff values being stored in FSoundChan need to be serialized
for savegames.
- Since loading of the sound lump is now done in S_LoadSound I added an IsNull
method to the SoundRenderer class so that this function doesn't need to
load the sound for the NullSoundRenderer.
- Took some more non-FMOD related code out of fmodsound.cpp, including the
code that checks for raw and Doom sounds. This means that sfxinfo_t is no
longer needed in the SoundRenderer class so I took out all references to it.
- Fixed: FMODSoundRenderer::StartSound3D must set the static variable pointing
to the rolloff information back to NULL when starting the sound fails.
- Fixed: Rolloff information was taken from the sfxinfo that contained the
actual sound data, not the one that was used for starting the sound.
- Fixed: Chex Quest's Super Bootspork was missing the pickup message.
- Added missing Strife automap colors for items and non-monsters.
- Fixed: GetMSLength didn't resolve random and player sounds.
- Moved sound aliasing code out of fmodsound.cpp into S_LoadSound.
- Fixed: The tagged version of TranslucentLine took the information for additive
translucency from the tagged linedef, not the control linedef.
- Added check for additive translucency to TRANMAP checking.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@175 b0f79afe-0144-0410-b225-9a4edf0717df
2008-09-14 07:03:28 +00:00
|
|
|
if (Button_Attack.bDown) cmd->ucmd.buttons |= BT_ATTACK;
|
|
|
|
if (Button_AltAttack.bDown) cmd->ucmd.buttons |= BT_ALTATTACK;
|
|
|
|
if (Button_Use.bDown) cmd->ucmd.buttons |= BT_USE;
|
|
|
|
if (Button_Jump.bDown) cmd->ucmd.buttons |= BT_JUMP;
|
|
|
|
if (Button_Crouch.bDown) cmd->ucmd.buttons |= BT_CROUCH;
|
|
|
|
if (Button_Zoom.bDown) cmd->ucmd.buttons |= BT_ZOOM;
|
|
|
|
if (Button_Reload.bDown) cmd->ucmd.buttons |= BT_RELOAD;
|
|
|
|
|
|
|
|
if (Button_User1.bDown) cmd->ucmd.buttons |= BT_USER1;
|
|
|
|
if (Button_User2.bDown) cmd->ucmd.buttons |= BT_USER2;
|
|
|
|
if (Button_User3.bDown) cmd->ucmd.buttons |= BT_USER3;
|
|
|
|
if (Button_User4.bDown) cmd->ucmd.buttons |= BT_USER4;
|
|
|
|
|
|
|
|
if (Button_Speed.bDown) cmd->ucmd.buttons |= BT_SPEED;
|
|
|
|
if (Button_Strafe.bDown) cmd->ucmd.buttons |= BT_STRAFE;
|
|
|
|
if (Button_MoveRight.bDown) cmd->ucmd.buttons |= BT_MOVERIGHT;
|
|
|
|
if (Button_MoveLeft.bDown) cmd->ucmd.buttons |= BT_MOVELEFT;
|
|
|
|
if (Button_LookDown.bDown) cmd->ucmd.buttons |= BT_LOOKDOWN;
|
|
|
|
if (Button_LookUp.bDown) cmd->ucmd.buttons |= BT_LOOKUP;
|
|
|
|
if (Button_Back.bDown) cmd->ucmd.buttons |= BT_BACK;
|
|
|
|
if (Button_Forward.bDown) cmd->ucmd.buttons |= BT_FORWARD;
|
|
|
|
if (Button_Right.bDown) cmd->ucmd.buttons |= BT_RIGHT;
|
|
|
|
if (Button_Left.bDown) cmd->ucmd.buttons |= BT_LEFT;
|
|
|
|
if (Button_MoveDown.bDown) cmd->ucmd.buttons |= BT_MOVEDOWN;
|
|
|
|
if (Button_MoveUp.bDown) cmd->ucmd.buttons |= BT_MOVEUP;
|
|
|
|
if (Button_ShowScores.bDown) cmd->ucmd.buttons |= BT_SHOWSCORES;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2009-06-24 22:19:34 +00:00
|
|
|
// Handle joysticks/game controllers.
|
|
|
|
float joyaxes[NUM_JOYAXIS];
|
|
|
|
|
|
|
|
I_GetAxes(joyaxes);
|
|
|
|
|
|
|
|
// Remap some axes depending on button state.
|
|
|
|
if (Button_Strafe.bDown || (Button_Mlook.bDown && lookstrafe))
|
|
|
|
{
|
2009-06-27 21:02:41 +00:00
|
|
|
joyaxes[JOYAXIS_Side] = joyaxes[JOYAXIS_Yaw];
|
2009-06-24 22:19:34 +00:00
|
|
|
joyaxes[JOYAXIS_Yaw] = 0;
|
|
|
|
}
|
|
|
|
if (Button_Mlook.bDown)
|
|
|
|
{
|
|
|
|
joyaxes[JOYAXIS_Pitch] = joyaxes[JOYAXIS_Forward];
|
|
|
|
joyaxes[JOYAXIS_Forward] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (joyaxes[JOYAXIS_Pitch] != 0)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1735:
- Added extra states to dehsupp for the MBF additions.
- Removed specific Button_Speed handling from the controllers' AddAxes()
methods. Analog axes now respond to Button_Speed and cl_run in exactly the
same way as digital buttons do.
- Changed rounding slightly for analog axis -> integer in G_BuildTiccmd().
- Fixed: FXInputController::ProcessThumbstick() was slightly off when it
converted to the range [-1.0,+1.0].
- Added default bindings for the Xbox 360 controller buttons.
- Fixed: Redefining an existing skill would set that skills ACSReturn to be
the same as the next new skill defined, if neither definition explicitly set
the value for ACSReturn.
- Added a DefaultSkill property. Adding it to a skill will cause that skill
to be the default one selected in the menu. If none is specified as the
default, then the middle skill is the default.
- Slider controls in the options menu now display their values
numerically next to the slider.
- The minimum value for m_yaw, m_pitch, m_forward, and m_side from the
menu has been dropped from 0.5 to 0, so those particular mouse motions can
be disabled entirely without using the console.
- added compat_anybossdeath to MAPINFO.
- fixed blue colormap
- Added parameters to A_VileAttack.
- Removed redundant definition of use_joystick from SDL/i_input.cpp.
- Turned net decompression into a non fatal error. It now drops the packet
and waits for the sender to send a new, hopefully good, packet.
- Reduced potential for overflow in R_ProjectSprite().
- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so
that additive time powerups can be activated before the existing
power has entered its blink threshold.
- Added a "BlueMap" for powerup colors.
- Added a NULL screen check when detaching HUD messages.
- Added HotWax's A_SetArg.
- Gez's patch for more A_WeaponReady flags:
* WRF_NOBOB (1): Weapon won't bob
* WRF_NOFIRE (12): Weapon won't fire at all
* WRF_NOSWITCH (2): Weapon can't be switched off
* WRF_NOPRIMARY (4): Weapon will not fire its main attack
* WRF_NOSECONDARY (8): Weapon will not fire its alt attack
- Attempt to add support for Microsoft's SideWinder Strategic Commander.
- Split the joystick menu into two parts: A top level with general options
and a list of all attached controllers, and a second level for configuring
an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
with an older DLL. This combination will now produce sound.
- added submission for raising master/children/siblings.
- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@402 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-24 13:47:25 +00:00
|
|
|
G_AddViewPitch(joyint(joyaxes[JOYAXIS_Pitch] * 2048));
|
2008-01-27 11:25:03 +00:00
|
|
|
LocalKeyboardTurner = true;
|
|
|
|
}
|
2009-06-24 22:19:34 +00:00
|
|
|
if (joyaxes[JOYAXIS_Yaw] != 0)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1735:
- Added extra states to dehsupp for the MBF additions.
- Removed specific Button_Speed handling from the controllers' AddAxes()
methods. Analog axes now respond to Button_Speed and cl_run in exactly the
same way as digital buttons do.
- Changed rounding slightly for analog axis -> integer in G_BuildTiccmd().
- Fixed: FXInputController::ProcessThumbstick() was slightly off when it
converted to the range [-1.0,+1.0].
- Added default bindings for the Xbox 360 controller buttons.
- Fixed: Redefining an existing skill would set that skills ACSReturn to be
the same as the next new skill defined, if neither definition explicitly set
the value for ACSReturn.
- Added a DefaultSkill property. Adding it to a skill will cause that skill
to be the default one selected in the menu. If none is specified as the
default, then the middle skill is the default.
- Slider controls in the options menu now display their values
numerically next to the slider.
- The minimum value for m_yaw, m_pitch, m_forward, and m_side from the
menu has been dropped from 0.5 to 0, so those particular mouse motions can
be disabled entirely without using the console.
- added compat_anybossdeath to MAPINFO.
- fixed blue colormap
- Added parameters to A_VileAttack.
- Removed redundant definition of use_joystick from SDL/i_input.cpp.
- Turned net decompression into a non fatal error. It now drops the packet
and waits for the sender to send a new, hopefully good, packet.
- Reduced potential for overflow in R_ProjectSprite().
- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so
that additive time powerups can be activated before the existing
power has entered its blink threshold.
- Added a "BlueMap" for powerup colors.
- Added a NULL screen check when detaching HUD messages.
- Added HotWax's A_SetArg.
- Gez's patch for more A_WeaponReady flags:
* WRF_NOBOB (1): Weapon won't bob
* WRF_NOFIRE (12): Weapon won't fire at all
* WRF_NOSWITCH (2): Weapon can't be switched off
* WRF_NOPRIMARY (4): Weapon will not fire its main attack
* WRF_NOSECONDARY (8): Weapon will not fire its alt attack
- Attempt to add support for Microsoft's SideWinder Strategic Commander.
- Split the joystick menu into two parts: A top level with general options
and a list of all attached controllers, and a second level for configuring
an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
with an older DLL. This combination will now produce sound.
- added submission for raising master/children/siblings.
- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@402 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-24 13:47:25 +00:00
|
|
|
G_AddViewAngle(joyint(-1280 * joyaxes[JOYAXIS_Yaw]));
|
2008-01-27 11:25:03 +00:00
|
|
|
LocalKeyboardTurner = true;
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1735:
- Added extra states to dehsupp for the MBF additions.
- Removed specific Button_Speed handling from the controllers' AddAxes()
methods. Analog axes now respond to Button_Speed and cl_run in exactly the
same way as digital buttons do.
- Changed rounding slightly for analog axis -> integer in G_BuildTiccmd().
- Fixed: FXInputController::ProcessThumbstick() was slightly off when it
converted to the range [-1.0,+1.0].
- Added default bindings for the Xbox 360 controller buttons.
- Fixed: Redefining an existing skill would set that skills ACSReturn to be
the same as the next new skill defined, if neither definition explicitly set
the value for ACSReturn.
- Added a DefaultSkill property. Adding it to a skill will cause that skill
to be the default one selected in the menu. If none is specified as the
default, then the middle skill is the default.
- Slider controls in the options menu now display their values
numerically next to the slider.
- The minimum value for m_yaw, m_pitch, m_forward, and m_side from the
menu has been dropped from 0.5 to 0, so those particular mouse motions can
be disabled entirely without using the console.
- added compat_anybossdeath to MAPINFO.
- fixed blue colormap
- Added parameters to A_VileAttack.
- Removed redundant definition of use_joystick from SDL/i_input.cpp.
- Turned net decompression into a non fatal error. It now drops the packet
and waits for the sender to send a new, hopefully good, packet.
- Reduced potential for overflow in R_ProjectSprite().
- Moved the IF_ADDITIVETIME check earlier in APowerup::HandlePickup so
that additive time powerups can be activated before the existing
power has entered its blink threshold.
- Added a "BlueMap" for powerup colors.
- Added a NULL screen check when detaching HUD messages.
- Added HotWax's A_SetArg.
- Gez's patch for more A_WeaponReady flags:
* WRF_NOBOB (1): Weapon won't bob
* WRF_NOFIRE (12): Weapon won't fire at all
* WRF_NOSWITCH (2): Weapon can't be switched off
* WRF_NOPRIMARY (4): Weapon will not fire its main attack
* WRF_NOSECONDARY (8): Weapon will not fire its alt attack
- Attempt to add support for Microsoft's SideWinder Strategic Commander.
- Split the joystick menu into two parts: A top level with general options
and a list of all attached controllers, and a second level for configuring
an individual controller.
- Fixed: Pressing Up at the top of a menu with more lines than fit on screen
would find an incorrect bottom position if the menu had a custom top height.
- Added the cvars joy_dinput, joy_ps2raw, and joy_xinput to enable/disable
specific game controller input systems independant of each other.
- Device change broadcasts are now sent to the Doom event queue, so
device scanning can be handled in one common place.
- Added a fast version of IsXInputDevice that uses the Raw Input device
list, because querying WMI for this information is painfully slow.
- Added support for compiling with FMOD Ex 4.26+ and running the game
with an older DLL. This combination will now produce sound.
- added submission for raising master/children/siblings.
- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@402 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-24 13:47:25 +00:00
|
|
|
side -= joyint(sidemove[speed] * joyaxes[JOYAXIS_Side]);
|
|
|
|
forward += joyint(joyaxes[JOYAXIS_Forward] * forwardmove[speed]);
|
|
|
|
fly += joyint(joyaxes[JOYAXIS_Up] * 2048);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2009-06-24 22:19:34 +00:00
|
|
|
// Handle mice.
|
2008-01-27 11:25:03 +00:00
|
|
|
if (!Button_Mlook.bDown && !freelook)
|
|
|
|
{
|
|
|
|
forward += (int)((float)mousey * m_forward);
|
|
|
|
}
|
|
|
|
|
|
|
|
cmd->ucmd.pitch = LocalViewPitch >> 16;
|
|
|
|
|
|
|
|
if (SendLand)
|
|
|
|
{
|
|
|
|
SendLand = false;
|
|
|
|
fly = -32768;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strafe || lookstrafe)
|
|
|
|
side += (int)((float)mousex * m_side);
|
|
|
|
|
|
|
|
mousex = mousey = 0;
|
|
|
|
|
2009-06-24 22:19:34 +00:00
|
|
|
// Build command.
|
2008-01-27 11:25:03 +00:00
|
|
|
if (forward > MAXPLMOVE)
|
|
|
|
forward = MAXPLMOVE;
|
|
|
|
else if (forward < -MAXPLMOVE)
|
|
|
|
forward = -MAXPLMOVE;
|
|
|
|
if (side > MAXPLMOVE)
|
|
|
|
side = MAXPLMOVE;
|
|
|
|
else if (side < -MAXPLMOVE)
|
|
|
|
side = -MAXPLMOVE;
|
|
|
|
|
|
|
|
cmd->ucmd.forwardmove += forward;
|
|
|
|
cmd->ucmd.sidemove += side;
|
|
|
|
cmd->ucmd.yaw = LocalViewAngle >> 16;
|
|
|
|
cmd->ucmd.upmove = fly;
|
|
|
|
LocalViewAngle = 0;
|
|
|
|
LocalViewPitch = 0;
|
|
|
|
|
|
|
|
// special buttons
|
|
|
|
if (sendturn180)
|
|
|
|
{
|
|
|
|
sendturn180 = false;
|
|
|
|
cmd->ucmd.buttons |= BT_TURN180;
|
|
|
|
}
|
|
|
|
if (sendpause)
|
|
|
|
{
|
|
|
|
sendpause = false;
|
|
|
|
Net_WriteByte (DEM_PAUSE);
|
|
|
|
}
|
|
|
|
if (sendsave)
|
|
|
|
{
|
|
|
|
sendsave = false;
|
|
|
|
Net_WriteByte (DEM_SAVEGAME);
|
|
|
|
Net_WriteString (savegamefile);
|
|
|
|
Net_WriteString (savedescription);
|
|
|
|
savegamefile = "";
|
|
|
|
}
|
|
|
|
if (SendItemUse == (const AInventory *)1)
|
|
|
|
{
|
|
|
|
Net_WriteByte (DEM_INVUSEALL);
|
|
|
|
SendItemUse = NULL;
|
|
|
|
}
|
|
|
|
else if (SendItemUse != NULL)
|
|
|
|
{
|
|
|
|
Net_WriteByte (DEM_INVUSE);
|
|
|
|
Net_WriteLong (SendItemUse->InventoryID);
|
|
|
|
SendItemUse = NULL;
|
|
|
|
}
|
|
|
|
if (SendItemDrop != NULL)
|
|
|
|
{
|
|
|
|
Net_WriteByte (DEM_INVDROP);
|
|
|
|
Net_WriteLong (SendItemDrop->InventoryID);
|
|
|
|
SendItemDrop = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
cmd->ucmd.forwardmove <<= 8;
|
|
|
|
cmd->ucmd.sidemove <<= 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
//[Graf Zahl] This really helps if the mouse update rate can't be increased!
|
|
|
|
CVAR (Bool, smooth_mouse, false, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|
|
|
|
|
|
|
void G_AddViewPitch (int look)
|
|
|
|
{
|
|
|
|
if (gamestate == GS_TITLELEVEL)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
look <<= 16;
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
if (players[consoleplayer].playerstate != PST_DEAD && // No adjustment while dead.
|
|
|
|
players[consoleplayer].ReadyWeapon != NULL && // No adjustment if no weapon.
|
|
|
|
players[consoleplayer].ReadyWeapon->FOVScale > 0) // No adjustment if it is non-positive.
|
|
|
|
{
|
|
|
|
look = int(look * players[consoleplayer].ReadyWeapon->FOVScale);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
if (!level.IsFreelookAllowed())
|
|
|
|
{
|
|
|
|
LocalViewPitch = 0;
|
|
|
|
}
|
|
|
|
else if (look > 0)
|
|
|
|
{
|
|
|
|
// Avoid overflowing
|
|
|
|
if (LocalViewPitch + look <= LocalViewPitch)
|
|
|
|
{
|
|
|
|
LocalViewPitch = 0x78000000;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LocalViewPitch = MIN(LocalViewPitch + look, 0x78000000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (look < 0)
|
|
|
|
{
|
|
|
|
// Avoid overflowing
|
|
|
|
if (LocalViewPitch + look >= LocalViewPitch)
|
|
|
|
{
|
|
|
|
LocalViewPitch = -0x78000000;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LocalViewPitch = MAX(LocalViewPitch + look, -0x78000000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (look != 0)
|
|
|
|
{
|
|
|
|
LocalKeyboardTurner = smooth_mouse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void G_AddViewAngle (int yaw)
|
|
|
|
{
|
|
|
|
if (gamestate == GS_TITLELEVEL)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
yaw <<= 16;
|
|
|
|
if (players[consoleplayer].playerstate != PST_DEAD && // No adjustment while dead.
|
|
|
|
players[consoleplayer].ReadyWeapon != NULL && // No adjustment if no weapon.
|
|
|
|
players[consoleplayer].ReadyWeapon->FOVScale > 0) // No adjustment if it is non-positive.
|
|
|
|
{
|
|
|
|
yaw = int(yaw * players[consoleplayer].ReadyWeapon->FOVScale);
|
|
|
|
}
|
|
|
|
LocalViewAngle -= yaw;
|
2008-01-27 11:25:03 +00:00
|
|
|
if (yaw != 0)
|
|
|
|
{
|
|
|
|
LocalKeyboardTurner = smooth_mouse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CVAR (Bool, bot_allowspy, false, 0)
|
|
|
|
|
|
|
|
// [RH] Spy mode has been separated into two console commands.
|
|
|
|
// One goes forward; the other goes backward.
|
|
|
|
static void ChangeSpy (bool forward)
|
|
|
|
{
|
|
|
|
// If you're not in a level, then you can't spy.
|
|
|
|
if (gamestate != GS_LEVEL)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If not viewing through a player, return your eyes to your own head.
|
|
|
|
if (players[consoleplayer].camera->player == NULL)
|
|
|
|
{
|
|
|
|
players[consoleplayer].camera = players[consoleplayer].mo;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-28 13:27:13 +00:00
|
|
|
// We may not be allowed to spy on anyone.
|
|
|
|
if (dmflags2 & DF2_DISALLOW_SPYING)
|
|
|
|
return;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// Otherwise, cycle to the next player.
|
|
|
|
bool checkTeam = !demoplayback && deathmatch;
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
int pnum = int(players[consoleplayer].camera->player - players);
|
2008-01-27 11:25:03 +00:00
|
|
|
int step = forward ? 1 : -1;
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
pnum += step;
|
|
|
|
pnum &= MAXPLAYERS-1;
|
|
|
|
if (playeringame[pnum] &&
|
|
|
|
(!checkTeam || players[pnum].mo->IsTeammate (players[consoleplayer].mo) ||
|
|
|
|
(bot_allowspy && players[pnum].isbot)))
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} while (pnum != consoleplayer);
|
|
|
|
|
|
|
|
players[consoleplayer].camera = players[pnum].mo;
|
|
|
|
S_UpdateSounds(players[consoleplayer].camera);
|
|
|
|
StatusBar->AttachToPlayer (&players[pnum]);
|
|
|
|
if (demoplayback || multiplayer)
|
|
|
|
{
|
|
|
|
StatusBar->ShowPlayerName ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (spynext)
|
|
|
|
{
|
|
|
|
// allow spy mode changes even during the demo
|
|
|
|
ChangeSpy (true);
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (spyprev)
|
|
|
|
{
|
|
|
|
// allow spy mode changes even during the demo
|
|
|
|
ChangeSpy (false);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_Responder
|
|
|
|
// Get info needed to make ticcmd_ts for the players.
|
|
|
|
//
|
|
|
|
bool G_Responder (event_t *ev)
|
|
|
|
{
|
|
|
|
// any other key pops up menu if in demos
|
|
|
|
// [RH] But only if the key isn't bound to a "special" command
|
|
|
|
if (gameaction == ga_nothing &&
|
|
|
|
(demoplayback || gamestate == GS_DEMOSCREEN || gamestate == GS_TITLELEVEL))
|
|
|
|
{
|
|
|
|
const char *cmd = C_GetBinding (ev->data1);
|
|
|
|
|
|
|
|
if (ev->type == EV_KeyDown)
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!cmd || (
|
|
|
|
strnicmp (cmd, "menu_", 5) &&
|
|
|
|
stricmp (cmd, "toggleconsole") &&
|
|
|
|
stricmp (cmd, "sizeup") &&
|
|
|
|
stricmp (cmd, "sizedown") &&
|
|
|
|
stricmp (cmd, "togglemap") &&
|
|
|
|
stricmp (cmd, "spynext") &&
|
|
|
|
stricmp (cmd, "spyprev") &&
|
|
|
|
stricmp (cmd, "chase") &&
|
|
|
|
stricmp (cmd, "+showscores") &&
|
|
|
|
stricmp (cmd, "bumpgamma") &&
|
|
|
|
stricmp (cmd, "screenshot")))
|
|
|
|
{
|
2009-08-07 19:34:42 +00:00
|
|
|
M_StartControlPanel (true, true);
|
2008-01-27 11:25:03 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return C_DoKey (ev);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cmd && cmd[0] == '+')
|
|
|
|
return C_DoKey (ev);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CT_Responder (ev))
|
|
|
|
return true; // chat ate the event
|
|
|
|
|
|
|
|
if (gamestate == GS_LEVEL)
|
|
|
|
{
|
|
|
|
if (ST_Responder (ev))
|
|
|
|
return true; // status window ate it
|
|
|
|
if (!viewactive && AM_Responder (ev))
|
|
|
|
return true; // automap ate it
|
|
|
|
}
|
|
|
|
else if (gamestate == GS_FINALE)
|
|
|
|
{
|
|
|
|
if (F_Responder (ev))
|
|
|
|
return true; // finale ate the event
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (ev->type)
|
|
|
|
{
|
|
|
|
case EV_KeyDown:
|
|
|
|
if (C_DoKey (ev))
|
|
|
|
return true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case EV_KeyUp:
|
|
|
|
C_DoKey (ev);
|
|
|
|
break;
|
|
|
|
|
|
|
|
// [RH] mouse buttons are sent as key up/down events
|
|
|
|
case EV_Mouse:
|
|
|
|
mousex = (int)(ev->x * mouse_sensitivity);
|
|
|
|
mousey = (int)(ev->y * mouse_sensitivity);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] If the view is active, give the automap a chance at
|
|
|
|
// the events *last* so that any bound keys get precedence.
|
|
|
|
|
|
|
|
if (gamestate == GS_LEVEL && viewactive)
|
|
|
|
return AM_Responder (ev);
|
|
|
|
|
|
|
|
return (ev->type == EV_KeyDown ||
|
|
|
|
ev->type == EV_Mouse);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_Ticker
|
|
|
|
// Make ticcmd_ts for the players.
|
|
|
|
//
|
|
|
|
extern FTexture *Page;
|
|
|
|
|
|
|
|
|
|
|
|
void G_Ticker ()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
gamestate_t oldgamestate;
|
|
|
|
|
|
|
|
// do player reborns if needed
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i] &&
|
|
|
|
(players[i].playerstate == PST_REBORN || players[i].playerstate == PST_ENTER))
|
|
|
|
{
|
|
|
|
G_DoReborn (i, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ToggleFullscreen)
|
|
|
|
{
|
|
|
|
static char toggle_fullscreen[] = "toggle fullscreen";
|
|
|
|
ToggleFullscreen = false;
|
|
|
|
AddCommandString (toggle_fullscreen);
|
|
|
|
}
|
|
|
|
|
|
|
|
// do things to change the game state
|
|
|
|
oldgamestate = gamestate;
|
|
|
|
while (gameaction != ga_nothing)
|
|
|
|
{
|
|
|
|
if (gameaction == ga_newgame2)
|
|
|
|
{
|
|
|
|
gameaction = ga_newgame;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
switch (gameaction)
|
|
|
|
{
|
|
|
|
case ga_loadlevel:
|
|
|
|
G_DoLoadLevel (-1, false);
|
|
|
|
break;
|
|
|
|
case ga_newgame2: // Silence GCC (see above)
|
|
|
|
case ga_newgame:
|
|
|
|
G_DoNewGame ();
|
|
|
|
break;
|
|
|
|
case ga_loadgame:
|
2008-12-21 08:31:23 +00:00
|
|
|
case ga_autoloadgame:
|
2008-01-27 11:25:03 +00:00
|
|
|
G_DoLoadGame ();
|
|
|
|
break;
|
|
|
|
case ga_savegame:
|
2008-02-14 13:07:19 +00:00
|
|
|
G_DoSaveGame (true, savegamefile, savedescription);
|
|
|
|
gameaction = ga_nothing;
|
|
|
|
savegamefile = "";
|
|
|
|
savedescription[0] = '\0';
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
case ga_autosave:
|
|
|
|
G_DoAutoSave ();
|
2008-02-14 13:07:19 +00:00
|
|
|
gameaction = ga_nothing;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
case ga_playdemo:
|
|
|
|
G_DoPlayDemo ();
|
|
|
|
break;
|
|
|
|
case ga_completed:
|
|
|
|
G_DoCompleted ();
|
|
|
|
break;
|
|
|
|
case ga_slideshow:
|
|
|
|
F_StartSlideshow ();
|
|
|
|
break;
|
|
|
|
case ga_worlddone:
|
|
|
|
G_DoWorldDone ();
|
|
|
|
break;
|
|
|
|
case ga_screenshot:
|
|
|
|
M_ScreenShot (shotfile);
|
|
|
|
shotfile = "";
|
|
|
|
gameaction = ga_nothing;
|
|
|
|
break;
|
|
|
|
case ga_fullconsole:
|
|
|
|
C_FullConsole ();
|
|
|
|
gameaction = ga_nothing;
|
|
|
|
break;
|
|
|
|
case ga_togglemap:
|
|
|
|
AM_ToggleMap ();
|
|
|
|
gameaction = ga_nothing;
|
|
|
|
break;
|
|
|
|
case ga_nothing:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
C_AdjustBottom ();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (oldgamestate != gamestate)
|
|
|
|
{
|
|
|
|
if (oldgamestate == GS_DEMOSCREEN && Page != NULL)
|
|
|
|
{
|
|
|
|
Page->Unload();
|
|
|
|
Page = NULL;
|
|
|
|
}
|
|
|
|
else if (oldgamestate == GS_FINALE)
|
|
|
|
{
|
|
|
|
F_EndFinale ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// get commands, check consistancy, and build new consistancy check
|
|
|
|
int buf = (gametic/ticdup)%BACKUPTICS;
|
|
|
|
|
|
|
|
// [RH] Include some random seeds and player stuff in the consistancy
|
|
|
|
// check, not just the player's x position like BOOM.
|
|
|
|
DWORD rngsum = FRandom::StaticSumSeeds ();
|
|
|
|
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
ticcmd_t *cmd = &players[i].cmd;
|
|
|
|
ticcmd_t *newcmd = &netcmds[i][buf];
|
|
|
|
|
|
|
|
if ((gametic % ticdup) == 0)
|
|
|
|
{
|
|
|
|
RunNetSpecs (i, buf);
|
|
|
|
}
|
|
|
|
if (demorecording)
|
|
|
|
{
|
|
|
|
G_WriteDemoTiccmd (newcmd, i, buf);
|
|
|
|
}
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
players[i].oldbuttons = cmd->ucmd.buttons;
|
2008-01-27 11:25:03 +00:00
|
|
|
// If the user alt-tabbed away, paused gets set to -1. In this case,
|
|
|
|
// we do not want to read more demo commands until paused is no
|
|
|
|
// longer negative.
|
|
|
|
if (demoplayback && paused >= 0)
|
|
|
|
{
|
|
|
|
G_ReadDemoTiccmd (cmd, i);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
memcpy (cmd, newcmd, sizeof(ticcmd_t));
|
|
|
|
}
|
|
|
|
|
|
|
|
// check for turbo cheats
|
|
|
|
if (cmd->ucmd.forwardmove > TURBOTHRESHOLD &&
|
|
|
|
!(gametic&31) && ((gametic>>5)&(MAXPLAYERS-1)) == i )
|
|
|
|
{
|
|
|
|
Printf ("%s is turbo!\n", players[i].userinfo.netname);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (netgame && !players[i].isbot && !netdemo && (gametic%ticdup) == 0)
|
|
|
|
{
|
|
|
|
//players[i].inconsistant = 0;
|
|
|
|
if (gametic > BACKUPTICS*ticdup && consistancy[i][buf] != cmd->consistancy)
|
|
|
|
{
|
|
|
|
players[i].inconsistant = gametic - BACKUPTICS*ticdup;
|
|
|
|
}
|
|
|
|
if (players[i].mo)
|
|
|
|
{
|
|
|
|
DWORD sum = rngsum + players[i].mo->x + players[i].mo->y + players[i].mo->z
|
|
|
|
+ players[i].mo->angle + players[i].mo->pitch;
|
|
|
|
sum ^= players[i].health;
|
|
|
|
consistancy[i][buf] = sum;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
consistancy[i][buf] = rngsum;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// do main actions
|
|
|
|
switch (gamestate)
|
|
|
|
{
|
|
|
|
case GS_LEVEL:
|
|
|
|
P_Ticker ();
|
|
|
|
AM_Ticker ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GS_TITLELEVEL:
|
|
|
|
P_Ticker ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GS_INTERMISSION:
|
|
|
|
WI_Ticker ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GS_FINALE:
|
|
|
|
F_Ticker ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GS_DEMOSCREEN:
|
|
|
|
D_PageTicker ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GS_STARTUP:
|
|
|
|
if (gameaction == ga_nothing)
|
|
|
|
{
|
|
|
|
gamestate = GS_FULLCONSOLE;
|
|
|
|
gameaction = ga_fullconsole;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// PLAYER STRUCTURE FUNCTIONS
|
|
|
|
// also see P_SpawnPlayer in P_Mobj
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_PlayerFinishLevel
|
|
|
|
// Called when a player completes a level.
|
|
|
|
//
|
|
|
|
void G_PlayerFinishLevel (int player, EFinishLevelType mode, bool resetinventory)
|
|
|
|
{
|
|
|
|
AInventory *item, *next;
|
|
|
|
player_t *p;
|
|
|
|
|
|
|
|
p = &players[player];
|
|
|
|
|
|
|
|
// Strip all current powers, unless moving in a hub and the power is okay to keep.
|
|
|
|
item = p->mo->Inventory;
|
|
|
|
while (item != NULL)
|
|
|
|
{
|
|
|
|
next = item->Inventory;
|
|
|
|
if (item->IsKindOf (RUNTIME_CLASS(APowerup)))
|
|
|
|
{
|
2009-06-07 20:15:36 +00:00
|
|
|
if (deathmatch || ((mode != FINISH_SameHub || !(item->ItemFlags & IF_HUBPOWER))
|
|
|
|
&& !(item->ItemFlags & IF_PERSISTENTPOWER))) // Keep persistent powers in non-deathmatch games
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
item->Destroy ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
item = next;
|
|
|
|
}
|
|
|
|
if (p->ReadyWeapon != NULL &&
|
|
|
|
p->ReadyWeapon->WeaponFlags&WIF_POWERED_UP &&
|
|
|
|
p->PendingWeapon == p->ReadyWeapon->SisterWeapon)
|
|
|
|
{
|
|
|
|
// Unselect powered up weapons if the unpowered counterpart is pending
|
|
|
|
p->ReadyWeapon=p->PendingWeapon;
|
|
|
|
}
|
|
|
|
p->mo->flags &= ~MF_SHADOW; // cancel invisibility
|
|
|
|
p->mo->RenderStyle = STYLE_Normal;
|
|
|
|
p->mo->alpha = FRACUNIT;
|
|
|
|
p->extralight = 0; // cancel gun flashes
|
2009-09-20 20:51:32 +00:00
|
|
|
p->fixedcolormap = NOFIXEDCOLORMAP; // cancel ir goggles
|
|
|
|
p->fixedlightlevel = -1;
|
2008-01-27 11:25:03 +00:00
|
|
|
p->damagecount = 0; // no palette changes
|
|
|
|
p->bonuscount = 0;
|
|
|
|
p->poisoncount = 0;
|
|
|
|
p->inventorytics = 0;
|
|
|
|
|
|
|
|
if (mode != FINISH_SameHub)
|
|
|
|
{
|
|
|
|
// Take away flight and keys (and anything else with IF_INTERHUBSTRIP set)
|
|
|
|
item = p->mo->Inventory;
|
|
|
|
while (item != NULL)
|
|
|
|
{
|
|
|
|
next = item->Inventory;
|
Update to ZDoom r1747:
- Added A_Mushroom compatibility option for Dehacked.
- Added Gez's submission for interhubamount DECORATE property.
- Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
parameter but to force it for Dehacked mods some minor hacks using the
Misc1 variable were needed.
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
influence of vertical thrust from the radius attack, since ZDoom does
explosions in three dimensions, but Doom only did it in two.
- Fixed: The last three parameters to A_VileAttack had their references off
by one. Most notably as a result, the blast radius was used as the thrust,
so it sent you flying far faster than it should have.
- Restored the reactiontime countdown for A_SpawnFly, since some Dehacked
mod could conceivable rely on it. The deadline is now kept in special2
and used in preference as long as it is non-zero.
- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
for being able to use strict aliasing rules? I dunno. It's still slower
than a VC++ build.
I did run into two cases where TAutoSegIterator caused intractable problems
with breaking strict aliasing rules, so I removed the templating from it,
and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
(in particular, dobject.h when not compiling with VC++).
- gdtoa now performs all type aliasing through unions. -Wall has been added
to the GCC flags for the library to help verify this.
- Changed A_SpawnFly to do nothing if reactiontime is 0. Reactiontime was
originally a counter, so if it started at 0, A_SpawnFly would effectively
never spawn anything. Fixes Dehacked patches that use A_SpawnSound to
play a sound without shooting boss cubes, since it also calls A_SpawnFly.
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@406 b0f79afe-0144-0410-b225-9a4edf0717df
2009-08-02 17:00:19 +00:00
|
|
|
if (item->InterHubAmount < 1)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
item->Destroy ();
|
|
|
|
}
|
|
|
|
item = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-02-05 00:06:30 +00:00
|
|
|
if (mode == FINISH_NoHub && !(level.flags2 & LEVEL2_KEEPFULLINVENTORY))
|
Update to ZDoom r1747:
- Added A_Mushroom compatibility option for Dehacked.
- Added Gez's submission for interhubamount DECORATE property.
- Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
parameter but to force it for Dehacked mods some minor hacks using the
Misc1 variable were needed.
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
influence of vertical thrust from the radius attack, since ZDoom does
explosions in three dimensions, but Doom only did it in two.
- Fixed: The last three parameters to A_VileAttack had their references off
by one. Most notably as a result, the blast radius was used as the thrust,
so it sent you flying far faster than it should have.
- Restored the reactiontime countdown for A_SpawnFly, since some Dehacked
mod could conceivable rely on it. The deadline is now kept in special2
and used in preference as long as it is non-zero.
- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
for being able to use strict aliasing rules? I dunno. It's still slower
than a VC++ build.
I did run into two cases where TAutoSegIterator caused intractable problems
with breaking strict aliasing rules, so I removed the templating from it,
and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
(in particular, dobject.h when not compiling with VC++).
- gdtoa now performs all type aliasing through unions. -Wall has been added
to the GCC flags for the library to help verify this.
- Changed A_SpawnFly to do nothing if reactiontime is 0. Reactiontime was
originally a counter, so if it started at 0, A_SpawnFly would effectively
never spawn anything. Fixes Dehacked patches that use A_SpawnSound to
play a sound without shooting boss cubes, since it also calls A_SpawnFly.
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@406 b0f79afe-0144-0410-b225-9a4edf0717df
2009-08-02 17:00:19 +00:00
|
|
|
{ // Reduce all owned (visible) inventory to defined maximum interhub amount
|
2008-01-27 11:25:03 +00:00
|
|
|
for (item = p->mo->Inventory; item != NULL; item = item->Inventory)
|
|
|
|
{
|
Update to ZDoom r1747:
- Added A_Mushroom compatibility option for Dehacked.
- Added Gez's submission for interhubamount DECORATE property.
- Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
parameter but to force it for Dehacked mods some minor hacks using the
Misc1 variable were needed.
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
influence of vertical thrust from the radius attack, since ZDoom does
explosions in three dimensions, but Doom only did it in two.
- Fixed: The last three parameters to A_VileAttack had their references off
by one. Most notably as a result, the blast radius was used as the thrust,
so it sent you flying far faster than it should have.
- Restored the reactiontime countdown for A_SpawnFly, since some Dehacked
mod could conceivable rely on it. The deadline is now kept in special2
and used in preference as long as it is non-zero.
- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
for being able to use strict aliasing rules? I dunno. It's still slower
than a VC++ build.
I did run into two cases where TAutoSegIterator caused intractable problems
with breaking strict aliasing rules, so I removed the templating from it,
and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
(in particular, dobject.h when not compiling with VC++).
- gdtoa now performs all type aliasing through unions. -Wall has been added
to the GCC flags for the library to help verify this.
- Changed A_SpawnFly to do nothing if reactiontime is 0. Reactiontime was
originally a counter, so if it started at 0, A_SpawnFly would effectively
never spawn anything. Fixes Dehacked patches that use A_SpawnSound to
play a sound without shooting boss cubes, since it also calls A_SpawnFly.
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@406 b0f79afe-0144-0410-b225-9a4edf0717df
2009-08-02 17:00:19 +00:00
|
|
|
// If the player is carrying more samples of an item than allowed, reduce amount accordingly
|
|
|
|
if (item->ItemFlags & IF_INVBAR && item->Amount > item->InterHubAmount)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1747:
- Added A_Mushroom compatibility option for Dehacked.
- Added Gez's submission for interhubamount DECORATE property.
- Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
parameter but to force it for Dehacked mods some minor hacks using the
Misc1 variable were needed.
- Moved the terget->velz assignment to the end of A_VileAttack to remove the
influence of vertical thrust from the radius attack, since ZDoom does
explosions in three dimensions, but Doom only did it in two.
- Fixed: The last three parameters to A_VileAttack had their references off
by one. Most notably as a result, the blast radius was used as the thrust,
so it sent you flying far faster than it should have.
- Restored the reactiontime countdown for A_SpawnFly, since some Dehacked
mod could conceivable rely on it. The deadline is now kept in special2
and used in preference as long as it is non-zero.
- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
for being able to use strict aliasing rules? I dunno. It's still slower
than a VC++ build.
I did run into two cases where TAutoSegIterator caused intractable problems
with breaking strict aliasing rules, so I removed the templating from it,
and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
(in particular, dobject.h when not compiling with VC++).
- gdtoa now performs all type aliasing through unions. -Wall has been added
to the GCC flags for the library to help verify this.
- Changed A_SpawnFly to do nothing if reactiontime is 0. Reactiontime was
originally a counter, so if it started at 0, A_SpawnFly would effectively
never spawn anything. Fixes Dehacked patches that use A_SpawnSound to
play a sound without shooting boss cubes, since it also calls A_SpawnFly.
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@406 b0f79afe-0144-0410-b225-9a4edf0717df
2009-08-02 17:00:19 +00:00
|
|
|
item->Amount = item->InterHubAmount;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (p->morphTics)
|
|
|
|
{ // Undo morph
|
2009-09-20 20:51:32 +00:00
|
|
|
P_UndoPlayerMorph (p, p, 0, true);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Clears the entire inventory and gives back the defaults for starting a game
|
|
|
|
if (resetinventory)
|
|
|
|
{
|
|
|
|
AInventory *inv = p->mo->Inventory;
|
|
|
|
|
|
|
|
while (inv != NULL)
|
|
|
|
{
|
|
|
|
AInventory *next = inv->Inventory;
|
|
|
|
if (!(inv->ItemFlags & IF_UNDROPPABLE))
|
|
|
|
{
|
|
|
|
inv->Destroy ();
|
|
|
|
}
|
|
|
|
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
|
|
|
|
{
|
|
|
|
AHexenArmor *harmor = static_cast<AHexenArmor *> (inv);
|
|
|
|
harmor->Slots[3] = harmor->Slots[2] = harmor->Slots[1] = harmor->Slots[0] = 0;
|
|
|
|
}
|
|
|
|
inv = next;
|
|
|
|
}
|
|
|
|
p->ReadyWeapon = NULL;
|
|
|
|
p->PendingWeapon = WP_NOCHANGE;
|
|
|
|
p->psprites[ps_weapon].state = NULL;
|
|
|
|
p->psprites[ps_flash].state = NULL;
|
|
|
|
p->mo->GiveDefaultInventory();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_PlayerReborn
|
|
|
|
// Called after a player dies
|
|
|
|
// almost everything is cleared and initialized
|
|
|
|
//
|
|
|
|
void G_PlayerReborn (int player)
|
|
|
|
{
|
|
|
|
player_t* p;
|
|
|
|
int frags[MAXPLAYERS];
|
|
|
|
int fragcount; // [RH] Cumulative frags
|
|
|
|
int killcount;
|
|
|
|
int itemcount;
|
|
|
|
int secretcount;
|
|
|
|
int chasecam;
|
|
|
|
BYTE currclass;
|
|
|
|
userinfo_t userinfo; // [RH] Save userinfo
|
|
|
|
botskill_t b_skill;//Added by MC:
|
|
|
|
APlayerPawn *actor;
|
|
|
|
const PClass *cls;
|
|
|
|
FString log;
|
|
|
|
|
|
|
|
p = &players[player];
|
|
|
|
|
|
|
|
memcpy (frags, p->frags, sizeof(frags));
|
|
|
|
fragcount = p->fragcount;
|
|
|
|
killcount = p->killcount;
|
|
|
|
itemcount = p->itemcount;
|
|
|
|
secretcount = p->secretcount;
|
|
|
|
currclass = p->CurrentPlayerClass;
|
|
|
|
b_skill = p->skill; //Added by MC:
|
|
|
|
memcpy (&userinfo, &p->userinfo, sizeof(userinfo));
|
|
|
|
actor = p->mo;
|
|
|
|
cls = p->cls;
|
|
|
|
log = p->LogText;
|
|
|
|
chasecam = p->cheats & CF_CHASECAM;
|
|
|
|
|
|
|
|
// Reset player structure to its defaults
|
|
|
|
p->~player_t();
|
|
|
|
::new(p) player_t;
|
|
|
|
|
|
|
|
memcpy (p->frags, frags, sizeof(p->frags));
|
|
|
|
p->fragcount = fragcount;
|
|
|
|
p->killcount = killcount;
|
|
|
|
p->itemcount = itemcount;
|
|
|
|
p->secretcount = secretcount;
|
|
|
|
p->CurrentPlayerClass = currclass;
|
|
|
|
memcpy (&p->userinfo, &userinfo, sizeof(userinfo));
|
|
|
|
p->mo = actor;
|
|
|
|
p->cls = cls;
|
|
|
|
p->LogText = log;
|
|
|
|
p->cheats |= chasecam;
|
|
|
|
|
|
|
|
p->skill = b_skill; //Added by MC:
|
|
|
|
|
Update to ZDoom r1222
- Moved IF_ALWAYSPICKUP and GiveQuest into CallTryPickup so that they are
automatically used by all inventory classes.
- The previous change made it necessary to replace all TryPickup calls with
another function that just calls TryPickup.
- Fixed: AInventory::TryPickup can change the toucher so this must be reported
to subclasses calling the super function. Changed TryPickup to pass the
toucher pointer by reference.
- Prefixed all names of CQ decorations with Chex after seeing some conflicts
with PWADs.
- Removed Chex Quest actors that were just unaltered duplicates of Doom's.
- Added detection for Chex Quest 3 IWAD.
- Cleaned up M_QuitGame because the code was almost incomprehensible and I
wanted to add CQ3's new quit messages.
- Added Chex Quest obituaries and a few other messages from CQ3.
- Fixed: drawbar improperly clipped images when not in the top left quadrant.
- Fixed: Crouching no longer worked due to a bug introduced by the
player input code.
- Added GetPlayerInput() for examining a player's inputs from ACS. Most
buttons are now passed across the network, and there are four new user
buttons specifically for use with this command. Also defined +zoom
and +reload for future implementation.
- Fixed: Hexen's fourth weapon pieces did not play the correct pickup sound,
and when they were fully assembled, they did not play the sound across the
entire level.
- Antialiasing of lines is now controlled solely by the vid_hwaalines cvar,
ignoring what the driver reports, since ATI is apparently just as bad as
NVidia.
- Added a check for D3DLINECAPS_ANTIALIAS, but this is complicated by the
fact that NVidia's don't report it, even though they support it. If there
are any cards that no longer have antialised lines on the automap, please
let me know.
- Added vid_hwaalines cvar to force antialiased lines off for the
Direct3D renderer, in case it doesn't really support them.
- Fixed: The new rolloff values being stored in FSoundChan need to be serialized
for savegames.
- Since loading of the sound lump is now done in S_LoadSound I added an IsNull
method to the SoundRenderer class so that this function doesn't need to
load the sound for the NullSoundRenderer.
- Took some more non-FMOD related code out of fmodsound.cpp, including the
code that checks for raw and Doom sounds. This means that sfxinfo_t is no
longer needed in the SoundRenderer class so I took out all references to it.
- Fixed: FMODSoundRenderer::StartSound3D must set the static variable pointing
to the rolloff information back to NULL when starting the sound fails.
- Fixed: Rolloff information was taken from the sfxinfo that contained the
actual sound data, not the one that was used for starting the sound.
- Fixed: Chex Quest's Super Bootspork was missing the pickup message.
- Added missing Strife automap colors for items and non-monsters.
- Fixed: GetMSLength didn't resolve random and player sounds.
- Moved sound aliasing code out of fmodsound.cpp into S_LoadSound.
- Fixed: The tagged version of TranslucentLine took the information for additive
translucency from the tagged linedef, not the control linedef.
- Added check for additive translucency to TRANMAP checking.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@175 b0f79afe-0144-0410-b225-9a4edf0717df
2008-09-14 07:03:28 +00:00
|
|
|
p->oldbuttons = ~0, p->attackdown = true; // don't do anything immediately
|
|
|
|
p->original_oldbuttons = ~0;
|
2008-01-27 11:25:03 +00:00
|
|
|
p->playerstate = PST_LIVE;
|
|
|
|
|
|
|
|
if (gamestate != GS_TITLELEVEL)
|
|
|
|
{
|
|
|
|
actor->GiveDefaultInventory ();
|
|
|
|
p->ReadyWeapon = p->PendingWeapon;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Added by MC: Init bot structure.
|
2008-03-28 09:56:50 +00:00
|
|
|
if (bglobal.botingame[player])
|
|
|
|
bglobal.CleanBotstuff (p);
|
2008-01-27 11:25:03 +00:00
|
|
|
else
|
|
|
|
p->isbot = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_CheckSpot
|
|
|
|
// Returns false if the player cannot be respawned
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
// at the given mapthing spot
|
2008-01-27 11:25:03 +00:00
|
|
|
// because something is occupying it
|
|
|
|
//
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
bool G_CheckSpot (int playernum, FMapThing *mthing)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
fixed_t x;
|
|
|
|
fixed_t y;
|
|
|
|
fixed_t z, oldz;
|
|
|
|
int i;
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
x = mthing->x;
|
|
|
|
y = mthing->y;
|
|
|
|
z = mthing->z;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
z += P_PointInSector (x, y)->floorplane.ZatPoint (x, y);
|
|
|
|
|
|
|
|
if (!players[playernum].mo)
|
|
|
|
{ // first spawn of level, before corpses
|
|
|
|
for (i = 0; i < playernum; i++)
|
|
|
|
if (players[i].mo && players[i].mo->x == x && players[i].mo->y == y)
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
oldz = players[playernum].mo->z; // [RH] Need to save corpse's z-height
|
|
|
|
players[playernum].mo->z = z; // [RH] Checks are now full 3-D
|
|
|
|
|
|
|
|
// killough 4/2/98: fix bug where P_CheckPosition() uses a non-solid
|
|
|
|
// corpse to detect collisions with other players in DM starts
|
|
|
|
//
|
|
|
|
// Old code:
|
|
|
|
// if (!P_CheckPosition (players[playernum].mo, x, y))
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
players[playernum].mo->flags |= MF_SOLID;
|
|
|
|
i = P_CheckPosition(players[playernum].mo, x, y);
|
|
|
|
players[playernum].mo->flags &= ~MF_SOLID;
|
|
|
|
players[playernum].mo->z = oldz; // [RH] Restore corpse's height
|
|
|
|
if (!i)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_DeathMatchSpawnPlayer
|
|
|
|
// Spawns a player at one of the random death match spots
|
|
|
|
// called at level load and each death
|
|
|
|
//
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
// [RH] Returns the distance of the closest player to the given mapthing
|
|
|
|
static fixed_t PlayersRangeFromSpot (FMapThing *spot)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
fixed_t closest = INT_MAX;
|
|
|
|
fixed_t distance;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i] || !players[i].mo || players[i].health <= 0)
|
|
|
|
continue;
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
distance = P_AproxDistance (players[i].mo->x - spot->x,
|
|
|
|
players[i].mo->y - spot->y);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
if (distance < closest)
|
|
|
|
closest = distance;
|
|
|
|
}
|
|
|
|
|
|
|
|
return closest;
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Select the deathmatch spawn spot farthest from everyone.
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
static FMapThing *SelectFarthestDeathmatchSpot (size_t selections)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
fixed_t bestdistance = 0;
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
FMapThing *bestspot = NULL;
|
2008-01-27 11:25:03 +00:00
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = 0; i < selections; i++)
|
|
|
|
{
|
|
|
|
fixed_t distance = PlayersRangeFromSpot (&deathmatchstarts[i]);
|
|
|
|
|
|
|
|
if (distance > bestdistance)
|
|
|
|
{
|
|
|
|
bestdistance = distance;
|
|
|
|
bestspot = &deathmatchstarts[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bestspot;
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Select a deathmatch spawn spot at random (original mechanism)
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
static FMapThing *SelectRandomDeathmatchSpot (int playernum, unsigned int selections)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
unsigned int i, j;
|
|
|
|
|
|
|
|
for (j = 0; j < 20; j++)
|
|
|
|
{
|
|
|
|
i = pr_dmspawn() % selections;
|
|
|
|
if (G_CheckSpot (playernum, &deathmatchstarts[i]) )
|
|
|
|
{
|
|
|
|
return &deathmatchstarts[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] return a spot anyway, since we allow telefragging when a player spawns
|
|
|
|
return &deathmatchstarts[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
void G_DeathMatchSpawnPlayer (int playernum)
|
|
|
|
{
|
|
|
|
unsigned int selections;
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
FMapThing *spot;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
selections = deathmatchstarts.Size ();
|
|
|
|
// [RH] We can get by with just 1 deathmatch start
|
|
|
|
if (selections < 1)
|
|
|
|
I_Error ("No deathmatch starts");
|
|
|
|
|
|
|
|
// At level start, none of the players have mobjs attached to them,
|
|
|
|
// so we always use the random deathmatch spawn. During the game,
|
|
|
|
// though, we use whatever dmflags specifies.
|
|
|
|
if ((dmflags & DF_SPAWN_FARTHEST) && players[playernum].mo)
|
|
|
|
spot = SelectFarthestDeathmatchSpot (selections);
|
|
|
|
else
|
|
|
|
spot = SelectRandomDeathmatchSpot (playernum, selections);
|
|
|
|
|
|
|
|
if (!spot)
|
|
|
|
{ // no good spot, so the player will probably get stuck
|
|
|
|
spot = &playerstarts[playernum];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (playernum < 4)
|
|
|
|
spot->type = playernum+1;
|
|
|
|
else if (gameinfo.gametype != GAME_Hexen)
|
|
|
|
spot->type = playernum+4001-4; // [RH] > 4 players
|
|
|
|
else
|
|
|
|
spot->type = playernum+9100-4;
|
|
|
|
}
|
|
|
|
|
2008-06-28 13:29:59 +00:00
|
|
|
AActor *mo = P_SpawnPlayer (spot);
|
|
|
|
if (mo != NULL) P_PlayerStartStomp(mo);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_QueueBody
|
|
|
|
//
|
|
|
|
static void G_QueueBody (AActor *body)
|
|
|
|
{
|
|
|
|
// flush an old corpse if needed
|
|
|
|
int modslot = bodyqueslot%BODYQUESIZE;
|
|
|
|
|
|
|
|
if (bodyqueslot >= BODYQUESIZE && bodyque[modslot] != NULL)
|
|
|
|
{
|
|
|
|
bodyque[modslot]->Destroy ();
|
|
|
|
}
|
|
|
|
bodyque[modslot] = body;
|
|
|
|
|
|
|
|
// Copy the player's translation, so that if they change their color later, only
|
|
|
|
// their current body will change and not all their old corpses.
|
|
|
|
if (GetTranslationType(body->Translation) == TRANSLATION_Players ||
|
|
|
|
GetTranslationType(body->Translation) == TRANSLATION_PlayersExtra)
|
|
|
|
{
|
|
|
|
*translationtables[TRANSLATION_PlayerCorpses][modslot] = *TranslationToTable(body->Translation);
|
|
|
|
body->Translation = TRANSLATION(TRANSLATION_PlayerCorpses,modslot);
|
2009-09-27 07:18:10 +00:00
|
|
|
translationtables[TRANSLATION_PlayerCorpses][modslot]->UpdateNative();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bodyqueslot++;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_DoReborn
|
|
|
|
//
|
|
|
|
void G_DoReborn (int playernum, bool freshbot)
|
|
|
|
{
|
2009-02-05 00:06:30 +00:00
|
|
|
if (!multiplayer && !(level.flags2 & LEVEL2_ALLOWRESPAWN))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (BackupSaveName.Len() > 0 && FileExists (BackupSaveName.GetChars()))
|
|
|
|
{ // Load game from the last point it was saved
|
|
|
|
savename = BackupSaveName;
|
2008-12-21 08:31:23 +00:00
|
|
|
gameaction = ga_autoloadgame;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Reload the level from scratch
|
|
|
|
bool indemo = demoplayback;
|
|
|
|
BackupSaveName = "";
|
|
|
|
G_InitNew (level.mapname, false);
|
|
|
|
demoplayback = indemo;
|
|
|
|
// gameaction = ga_loadlevel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// respawn at the start
|
|
|
|
int i;
|
|
|
|
|
|
|
|
// first disassociate the corpse
|
|
|
|
if (players[playernum].mo)
|
|
|
|
{
|
|
|
|
G_QueueBody (players[playernum].mo);
|
|
|
|
players[playernum].mo->player = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// spawn at random spot if in death match
|
|
|
|
if (deathmatch)
|
|
|
|
{
|
|
|
|
G_DeathMatchSpawnPlayer (playernum);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (G_CheckSpot (playernum, &playerstarts[playernum]) )
|
|
|
|
{
|
2008-06-28 13:29:59 +00:00
|
|
|
AActor *mo = P_SpawnPlayer (&playerstarts[playernum]);
|
|
|
|
if (mo != NULL) P_PlayerStartStomp(mo);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// try to spawn at one of the other players' spots
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (G_CheckSpot (playernum, &playerstarts[i]) )
|
|
|
|
{
|
|
|
|
int oldtype = playerstarts[i].type;
|
|
|
|
|
|
|
|
// fake as other player
|
|
|
|
// [RH] These numbers should be common across all games. Or better yet, not
|
|
|
|
// used at all outside P_SpawnMapThing().
|
|
|
|
if (playernum < 4 || gameinfo.gametype == GAME_Strife)
|
|
|
|
{
|
|
|
|
playerstarts[i].type = playernum + 1;
|
|
|
|
}
|
|
|
|
else if (gameinfo.gametype == GAME_Hexen)
|
|
|
|
{
|
|
|
|
playerstarts[i].type = playernum + 9100 - 4;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
playerstarts[i].type = playernum + 4001 - 4;
|
|
|
|
}
|
2008-06-28 13:29:59 +00:00
|
|
|
AActor *mo = P_SpawnPlayer (&playerstarts[i]);
|
|
|
|
if (mo != NULL) P_PlayerStartStomp(mo);
|
2008-01-27 11:25:03 +00:00
|
|
|
playerstarts[i].type = oldtype; // restore
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// he's going to be inside something. Too bad.
|
|
|
|
}
|
2008-06-28 13:29:59 +00:00
|
|
|
AActor *mo = P_SpawnPlayer (&playerstarts[playernum]);
|
|
|
|
if (mo != NULL) P_PlayerStartStomp(mo);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void G_ScreenShot (char *filename)
|
|
|
|
{
|
|
|
|
shotfile = filename;
|
|
|
|
gameaction = ga_screenshot;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_InitFromSavegame
|
|
|
|
// Can be called by the startup code or the menu task.
|
|
|
|
//
|
|
|
|
void G_LoadGame (const char* name)
|
|
|
|
{
|
|
|
|
if (name != NULL)
|
|
|
|
{
|
|
|
|
savename = name;
|
|
|
|
gameaction = ga_loadgame;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool CheckSingleWad (char *name, bool &printRequires, bool printwarn)
|
|
|
|
{
|
|
|
|
if (name == NULL)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (Wads.CheckIfWadLoaded (name) < 0)
|
|
|
|
{
|
|
|
|
if (printwarn)
|
|
|
|
{
|
|
|
|
if (!printRequires)
|
|
|
|
{
|
|
|
|
Printf ("This savegame needs these wads:\n%s", name);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf (", %s", name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printRequires = true;
|
|
|
|
delete[] name;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
delete[] name;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return false if not all the needed wads have been loaded.
|
|
|
|
bool G_CheckSaveGameWads (PNGHandle *png, bool printwarn)
|
|
|
|
{
|
|
|
|
char *text;
|
|
|
|
bool printRequires = false;
|
|
|
|
|
|
|
|
text = M_GetPNGText (png, "Game WAD");
|
|
|
|
CheckSingleWad (text, printRequires, printwarn);
|
|
|
|
text = M_GetPNGText (png, "Map WAD");
|
|
|
|
CheckSingleWad (text, printRequires, printwarn);
|
|
|
|
|
|
|
|
if (printRequires)
|
|
|
|
{
|
|
|
|
if (printwarn)
|
|
|
|
{
|
|
|
|
Printf ("\n");
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void G_DoLoadGame ()
|
|
|
|
{
|
|
|
|
char sigcheck[20];
|
|
|
|
char *text = NULL;
|
|
|
|
char *map;
|
|
|
|
|
2008-12-21 08:31:23 +00:00
|
|
|
if (gameaction != ga_autoloadgame)
|
|
|
|
{
|
|
|
|
demoplayback = false;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
gameaction = ga_nothing;
|
|
|
|
|
|
|
|
FILE *stdfile = fopen (savename.GetChars(), "rb");
|
|
|
|
if (stdfile == NULL)
|
|
|
|
{
|
|
|
|
Printf ("Could not read savegame '%s'\n", savename.GetChars());
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
PNGHandle *png = M_VerifyPNG (stdfile);
|
|
|
|
if (png == NULL)
|
|
|
|
{
|
|
|
|
fclose (stdfile);
|
|
|
|
Printf ("'%s' is not a valid (PNG) savegame\n", savename.GetChars());
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SaveVersion = 0;
|
|
|
|
|
|
|
|
// Check whether this savegame actually has been created by a compatible engine.
|
|
|
|
// Since there are ZDoom derivates using the exact same savegame format but
|
|
|
|
// with mutual incompatibilities this check simplifies things significantly.
|
|
|
|
char *engine = M_GetPNGText (png, "Engine");
|
|
|
|
if (engine == NULL || 0 != strcmp (engine, GAMESIG))
|
|
|
|
{
|
|
|
|
// Make a special case for the message printed for old savegames that don't
|
|
|
|
// have this information.
|
|
|
|
if (engine == NULL)
|
|
|
|
{
|
|
|
|
Printf ("Savegame is from an incompatible version\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf ("Savegame is from another ZDoom-based engine: %s\n", engine);
|
|
|
|
delete[] engine;
|
|
|
|
}
|
|
|
|
delete png;
|
|
|
|
fclose (stdfile);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (engine != NULL)
|
|
|
|
{
|
|
|
|
delete[] engine;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!M_GetPNGText (png, "ZDoom Save Version", sigcheck, 20) ||
|
|
|
|
0 != strncmp (sigcheck, SAVESIG, 9) || // ZDOOMSAVE is the first 9 chars
|
|
|
|
(SaveVersion = atoi (sigcheck+9)) < MINSAVEVER)
|
|
|
|
{
|
|
|
|
Printf ("Savegame is from an incompatible version\n");
|
|
|
|
delete png;
|
|
|
|
fclose (stdfile);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!G_CheckSaveGameWads (png, true))
|
|
|
|
{
|
|
|
|
fclose (stdfile);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
map = M_GetPNGText (png, "Current Map");
|
|
|
|
if (map == NULL)
|
|
|
|
{
|
|
|
|
Printf ("Savegame is missing the current map\n");
|
|
|
|
fclose (stdfile);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Read intermission data for hubs
|
|
|
|
G_ReadHubInfo(png);
|
|
|
|
|
2008-03-28 09:56:50 +00:00
|
|
|
bglobal.RemoveAllBots (true);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
text = M_GetPNGText (png, "Important CVARs");
|
|
|
|
if (text != NULL)
|
|
|
|
{
|
|
|
|
BYTE *vars_p = (BYTE *)text;
|
|
|
|
C_ReadCVars (&vars_p);
|
|
|
|
delete[] text;
|
|
|
|
}
|
|
|
|
|
|
|
|
// dearchive all the modifications
|
|
|
|
if (M_FindPNGChunk (png, MAKE_ID('p','t','I','c')) == 8)
|
|
|
|
{
|
|
|
|
DWORD time[2];
|
|
|
|
fread (&time, 8, 1, stdfile);
|
|
|
|
time[0] = BigLong((unsigned int)time[0]);
|
|
|
|
time[1] = BigLong((unsigned int)time[1]);
|
|
|
|
level.time = Scale (time[1], TICRATE, time[0]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // No ptIc chunk so we don't know how long the user was playing
|
|
|
|
level.time = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
G_ReadSnapshots (png);
|
|
|
|
FRandom::StaticReadRNGState (png);
|
|
|
|
P_ReadACSDefereds (png);
|
|
|
|
|
|
|
|
// load a base level
|
|
|
|
savegamerestore = true; // Use the player actors in the savegame
|
|
|
|
bool demoplaybacksave = demoplayback;
|
|
|
|
G_InitNew (map, false);
|
|
|
|
demoplayback = demoplaybacksave;
|
|
|
|
delete[] map;
|
|
|
|
savegamerestore = false;
|
|
|
|
|
2009-02-05 00:06:30 +00:00
|
|
|
P_ReadACSVars(png);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
NextSkill = -1;
|
|
|
|
if (M_FindPNGChunk (png, MAKE_ID('s','n','X','t')) == 1)
|
|
|
|
{
|
|
|
|
BYTE next;
|
|
|
|
fread (&next, 1, 1, stdfile);
|
|
|
|
NextSkill = next;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (level.info->snapshot != NULL)
|
|
|
|
{
|
|
|
|
delete level.info->snapshot;
|
|
|
|
level.info->snapshot = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
BackupSaveName = savename;
|
|
|
|
|
|
|
|
delete png;
|
|
|
|
fclose (stdfile);
|
2008-03-13 10:21:13 +00:00
|
|
|
|
|
|
|
// At this point, the GC threshold is likely a lot higher than the
|
|
|
|
// amount of memory in use, so bring it down now by starting a
|
|
|
|
// collection.
|
|
|
|
GC::StartCollection();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_SaveGame
|
|
|
|
// Called by the menu task.
|
|
|
|
// Description is a 24 byte text string
|
|
|
|
//
|
|
|
|
void G_SaveGame (const char *filename, const char *description)
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
if (sendsave || gameaction == ga_savegame)
|
|
|
|
{
|
|
|
|
Printf ("A game save is still pending.\n");
|
|
|
|
return;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
savegamefile = filename;
|
2008-02-14 13:07:19 +00:00
|
|
|
strncpy (savedescription, description, sizeof(savedescription)-1);
|
|
|
|
savedescription[sizeof(savedescription)-1] = '\0';
|
2008-01-27 11:25:03 +00:00
|
|
|
sendsave = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
FString G_BuildSaveName (const char *prefix, int slot)
|
|
|
|
{
|
|
|
|
FString name;
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
FString leader;
|
2008-01-27 11:25:03 +00:00
|
|
|
const char *slash = "";
|
|
|
|
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
leader = Args->CheckValue ("-savedir");
|
|
|
|
if (leader.IsEmpty())
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2009-09-10 22:20:46 +00:00
|
|
|
#if !defined(unix) && !defined(__APPLE__)
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
if (Args->CheckParm ("-cdrom"))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
leader = CDROM_DIR "/";
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
else
|
2008-01-27 11:25:03 +00:00
|
|
|
#endif
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
{
|
|
|
|
leader = save_dir;
|
|
|
|
}
|
Update to ZDoom r1616:
- Removed HaveFocus variable in preference of using GetForegroundWindow().
- Added Raw Input keyboard handling.
- Split DirectInput keyboard handling into a separate file and class. I also
switched it to buffered input, and the pause key seems to be properly
cooked, so I don't need to look for it with WM_KEYDOWN/UP. Tab doesn't
need to be special-cased either, because buffered input never passes on
the Tab key when you press Alt+Tab. I have no idea why I special-cased
Num Lock, but it seems to be working fine. By setting the exclusive mode
to background, I can also avoid special code for releasing all keys when
the window loses focus, because I'll still receive those events while the
window is in the background.
- Fixed: The Heretic "take weapons" cheat did not remove all the weapons at
once. This is because destroying one weapon has a potential to destroy a
sister weapon as well. If the sister weapon is the next one in line (as it
typically is), it would process that one, not realizing it was no longer
part of the inventory, and stop because its Inventory link was NULL.
- Recoverable errors that are caught during the demo loop no longer shut off
the menu.
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
SetCursorState(), since changing the pointer isn't working with it
(probably due to the lack of legacy mouse messages), and the others work
fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
value is signed, so it requires a cast to use it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@333 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-27 22:16:34 +00:00
|
|
|
if (leader.IsEmpty())
|
|
|
|
{
|
2009-10-30 11:18:39 +00:00
|
|
|
#ifdef unix
|
2009-08-30 19:31:59 +00:00
|
|
|
leader = "~/" GAME_DIR;
|
2009-09-10 22:20:46 +00:00
|
|
|
#elif defined(__APPLE__)
|
|
|
|
char cpath[PATH_MAX];
|
|
|
|
FSRef folder;
|
|
|
|
|
|
|
|
if (noErr == FSFindFolder(kUserDomain, kDocumentsFolderType, kCreateFolder, &folder) &&
|
|
|
|
noErr == FSRefMakePath(&folder, (UInt8*)cpath, PATH_MAX))
|
|
|
|
{
|
|
|
|
leader << cpath << "/" GAME_DIR "/Savegames/";
|
|
|
|
}
|
2009-10-30 11:18:39 +00:00
|
|
|
#else
|
|
|
|
leader = progdir;
|
Update to ZDoom r1616:
- Removed HaveFocus variable in preference of using GetForegroundWindow().
- Added Raw Input keyboard handling.
- Split DirectInput keyboard handling into a separate file and class. I also
switched it to buffered input, and the pause key seems to be properly
cooked, so I don't need to look for it with WM_KEYDOWN/UP. Tab doesn't
need to be special-cased either, because buffered input never passes on
the Tab key when you press Alt+Tab. I have no idea why I special-cased
Num Lock, but it seems to be working fine. By setting the exclusive mode
to background, I can also avoid special code for releasing all keys when
the window loses focus, because I'll still receive those events while the
window is in the background.
- Fixed: The Heretic "take weapons" cheat did not remove all the weapons at
once. This is because destroying one weapon has a potential to destroy a
sister weapon as well. If the sister weapon is the next one in line (as it
typically is), it would process that one, not realizing it was no longer
part of the inventory, and stop because its Inventory link was NULL.
- Recoverable errors that are caught during the demo loop no longer shut off
the menu.
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
SetCursorState(), since changing the pointer isn't working with it
(probably due to the lack of legacy mouse messages), and the others work
fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
value is signed, so it requires a cast to use it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@333 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-27 22:16:34 +00:00
|
|
|
#endif
|
2009-10-30 11:18:39 +00:00
|
|
|
}
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
}
|
|
|
|
size_t len = leader.Len();
|
|
|
|
if (leader[0] != '\0' && leader[len-1] != '\\' && leader[len-1] != '/')
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
slash = "/";
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
Update to ZDoom r1616:
- Removed HaveFocus variable in preference of using GetForegroundWindow().
- Added Raw Input keyboard handling.
- Split DirectInput keyboard handling into a separate file and class. I also
switched it to buffered input, and the pause key seems to be properly
cooked, so I don't need to look for it with WM_KEYDOWN/UP. Tab doesn't
need to be special-cased either, because buffered input never passes on
the Tab key when you press Alt+Tab. I have no idea why I special-cased
Num Lock, but it seems to be working fine. By setting the exclusive mode
to background, I can also avoid special code for releasing all keys when
the window loses focus, because I'll still receive those events while the
window is in the background.
- Fixed: The Heretic "take weapons" cheat did not remove all the weapons at
once. This is because destroying one weapon has a potential to destroy a
sister weapon as well. If the sister weapon is the next one in line (as it
typically is), it would process that one, not realizing it was no longer
part of the inventory, and stop because its Inventory link was NULL.
- Recoverable errors that are caught during the demo loop no longer shut off
the menu.
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
SetCursorState(), since changing the pointer isn't working with it
(probably due to the lack of legacy mouse messages), and the others work
fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
value is signed, so it requires a cast to use it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@333 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-27 22:16:34 +00:00
|
|
|
name << leader << slash;
|
|
|
|
name = NicePath(name);
|
|
|
|
CreatePath(name);
|
|
|
|
name << prefix;
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
if (slot >= 0)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
name.AppendFormat("%d.zds", slot);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
Update to ZDoom r1616:
- Removed HaveFocus variable in preference of using GetForegroundWindow().
- Added Raw Input keyboard handling.
- Split DirectInput keyboard handling into a separate file and class. I also
switched it to buffered input, and the pause key seems to be properly
cooked, so I don't need to look for it with WM_KEYDOWN/UP. Tab doesn't
need to be special-cased either, because buffered input never passes on
the Tab key when you press Alt+Tab. I have no idea why I special-cased
Num Lock, but it seems to be working fine. By setting the exclusive mode
to background, I can also avoid special code for releasing all keys when
the window loses focus, because I'll still receive those events while the
window is in the background.
- Fixed: The Heretic "take weapons" cheat did not remove all the weapons at
once. This is because destroying one weapon has a potential to destroy a
sister weapon as well. If the sister weapon is the next one in line (as it
typically is), it would process that one, not realizing it was no longer
part of the inventory, and stop because its Inventory link was NULL.
- Recoverable errors that are caught during the demo loop no longer shut off
the menu.
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
SetCursorState(), since changing the pointer isn't working with it
(probably due to the lack of legacy mouse messages), and the others work
fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
value is signed, so it requires a cast to use it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@333 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-27 22:16:34 +00:00
|
|
|
return name;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CVAR (Int, autosavenum, 0, CVAR_NOSET|CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
|
|
CVAR (Int, disableautosave, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
|
|
CUSTOM_CVAR (Int, autosavecount, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
|
|
{
|
|
|
|
if (self < 0)
|
|
|
|
self = 0;
|
|
|
|
if (self > 20)
|
|
|
|
self = 20;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern void P_CalcHeight (player_t *);
|
|
|
|
|
|
|
|
void G_DoAutoSave ()
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
char description[SAVESTRINGSIZE];
|
|
|
|
FString file;
|
2008-01-27 11:25:03 +00:00
|
|
|
// Keep up to four autosaves at a time
|
|
|
|
UCVarValue num;
|
|
|
|
const char *readableTime;
|
|
|
|
int count = autosavecount != 0 ? autosavecount : 1;
|
|
|
|
|
|
|
|
num.Int = (autosavenum + 1) % count;
|
|
|
|
autosavenum.ForceSet (num, CVAR_Int);
|
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
file = G_BuildSaveName ("auto", num.Int);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
readableTime = myasctime ();
|
2008-02-14 13:07:19 +00:00
|
|
|
strcpy (description, "Autosave ");
|
|
|
|
strncpy (description+9, readableTime+4, 12);
|
|
|
|
description[9+12] = 0;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
G_DoSaveGame (false, file, description);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void PutSaveWads (FILE *file)
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
|
|
|
|
// Name of IWAD
|
|
|
|
name = Wads.GetWadName (FWadCollection::IWAD_FILENUM);
|
|
|
|
M_AppendPNGText (file, "Game WAD", name);
|
|
|
|
|
|
|
|
// Name of wad the map resides in
|
|
|
|
if (Wads.GetLumpFile (level.lumpnum) > 1)
|
|
|
|
{
|
|
|
|
name = Wads.GetWadName (Wads.GetLumpFile (level.lumpnum));
|
|
|
|
M_AppendPNGText (file, "Map WAD", name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void PutSaveComment (FILE *file)
|
|
|
|
{
|
|
|
|
char comment[256];
|
|
|
|
const char *readableTime;
|
|
|
|
WORD len;
|
|
|
|
int levelTime;
|
|
|
|
|
|
|
|
// Get the current date and time
|
|
|
|
readableTime = myasctime ();
|
|
|
|
|
|
|
|
strncpy (comment, readableTime, 10);
|
|
|
|
strncpy (comment+10, readableTime+19, 5);
|
|
|
|
strncpy (comment+15, readableTime+10, 9);
|
|
|
|
comment[24] = 0;
|
|
|
|
|
|
|
|
M_AppendPNGText (file, "Creation Time", comment);
|
|
|
|
|
|
|
|
// Get level name
|
|
|
|
//strcpy (comment, level.level_name);
|
2009-02-05 00:06:30 +00:00
|
|
|
mysnprintf(comment, countof(comment), "%s - %s", level.mapname, level.LevelName.GetChars());
|
2008-01-27 11:25:03 +00:00
|
|
|
len = (WORD)strlen (comment);
|
|
|
|
comment[len] = '\n';
|
|
|
|
|
|
|
|
// Append elapsed time
|
|
|
|
levelTime = level.time / TICRATE;
|
Update to ZDoom r1083. Not fully tested yet!
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code.
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
|
|
|
mysnprintf (comment + len + 1, countof(comment) - len - 1, "time: %02d:%02d:%02d",
|
2008-01-27 11:25:03 +00:00
|
|
|
levelTime/3600, (levelTime%3600)/60, levelTime%60);
|
|
|
|
comment[len+16] = 0;
|
|
|
|
|
|
|
|
// Write out the comment
|
|
|
|
M_AppendPNGText (file, "Comment", comment);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void PutSavePic (FILE *file, int width, int height)
|
|
|
|
{
|
|
|
|
if (width <= 0 || height <= 0 || !storesavepic)
|
|
|
|
{
|
|
|
|
M_CreateDummyPNG (file);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
P_CheckPlayerSprites();
|
|
|
|
screen->WriteSavePic(&players[consoleplayer], file, width, height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
void G_DoSaveGame (bool okForQuicksave, FString filename, const char *description)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-07-06 17:32:31 +00:00
|
|
|
// Do not even try, if we're not in a level. (Can happen after
|
|
|
|
// a demo finishes playback.)
|
|
|
|
if (lines == NULL || sectors == NULL)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
if (demoplayback)
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
filename = G_BuildSaveName ("demosave.zds", -1);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
insave = true;
|
|
|
|
G_SnapshotLevel ();
|
|
|
|
|
Update to ZDoom r1616:
- Removed HaveFocus variable in preference of using GetForegroundWindow().
- Added Raw Input keyboard handling.
- Split DirectInput keyboard handling into a separate file and class. I also
switched it to buffered input, and the pause key seems to be properly
cooked, so I don't need to look for it with WM_KEYDOWN/UP. Tab doesn't
need to be special-cased either, because buffered input never passes on
the Tab key when you press Alt+Tab. I have no idea why I special-cased
Num Lock, but it seems to be working fine. By setting the exclusive mode
to background, I can also avoid special code for releasing all keys when
the window loses focus, because I'll still receive those events while the
window is in the background.
- Fixed: The Heretic "take weapons" cheat did not remove all the weapons at
once. This is because destroying one weapon has a potential to destroy a
sister weapon as well. If the sister weapon is the next one in line (as it
typically is), it would process that one, not realizing it was no longer
part of the inventory, and stop because its Inventory link was NULL.
- Recoverable errors that are caught during the demo loop no longer shut off
the menu.
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in
the background and it grabs the mouse anyway.
- Changed raw mouse grabbing to call ShowCursor() directly instead of through
SetCursorState(), since changing the pointer isn't working with it
(probably due to the lack of legacy mouse messages), and the others work
fine by setting an invisible cursor.
- Fixed: Raw mouse input passes wheel movements in an unsigned field, but the
value is signed, so it requires a cast to use it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@333 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-27 22:16:34 +00:00
|
|
|
FILE *stdfile = fopen (filename, "wb");
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
if (stdfile == NULL)
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
Printf ("Could not create savegame '%s'\n", filename.GetChars());
|
2008-01-27 11:25:03 +00:00
|
|
|
insave = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SaveVersion = SAVEVER;
|
|
|
|
PutSavePic (stdfile, SAVEPICWIDTH, SAVEPICHEIGHT);
|
|
|
|
M_AppendPNGText (stdfile, "Software", "ZDoom " DOTVERSIONSTR);
|
|
|
|
M_AppendPNGText (stdfile, "Engine", GAMESIG);
|
|
|
|
M_AppendPNGText (stdfile, "ZDoom Save Version", SAVESIG);
|
2008-02-14 13:07:19 +00:00
|
|
|
M_AppendPNGText (stdfile, "Title", description);
|
2008-01-27 11:25:03 +00:00
|
|
|
M_AppendPNGText (stdfile, "Current Map", level.mapname);
|
|
|
|
PutSaveWads (stdfile);
|
|
|
|
PutSaveComment (stdfile);
|
|
|
|
|
|
|
|
// Intermission stats for hubs
|
|
|
|
G_WriteHubInfo(stdfile);
|
|
|
|
|
|
|
|
{
|
|
|
|
BYTE vars[4096], *vars_p;
|
|
|
|
vars_p = vars;
|
|
|
|
C_WriteCVars (&vars_p, CVAR_SERVERINFO);
|
|
|
|
*vars_p = 0;
|
|
|
|
M_AppendPNGText (stdfile, "Important CVARs", (char *)vars);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (level.time != 0 || level.maptime != 0)
|
|
|
|
{
|
|
|
|
DWORD time[2] = { BigLong(TICRATE), BigLong(level.time) };
|
|
|
|
M_AppendPNGChunk (stdfile, MAKE_ID('p','t','I','c'), (BYTE *)&time, 8);
|
|
|
|
}
|
|
|
|
|
|
|
|
G_WriteSnapshots (stdfile);
|
|
|
|
FRandom::StaticWriteRNGState (stdfile);
|
|
|
|
P_WriteACSDefereds (stdfile);
|
|
|
|
|
2009-02-05 00:06:30 +00:00
|
|
|
P_WriteACSVars(stdfile);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
if (NextSkill != -1)
|
|
|
|
{
|
|
|
|
BYTE next = NextSkill;
|
|
|
|
M_AppendPNGChunk (stdfile, MAKE_ID('s','n','X','t'), &next, 1);
|
|
|
|
}
|
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
M_NotifyNewSave (filename.GetChars(), description, okForQuicksave);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
M_FinishPNG (stdfile);
|
|
|
|
fclose (stdfile);
|
|
|
|
|
|
|
|
// Check whether the file is ok.
|
|
|
|
bool success = false;
|
2008-02-14 13:07:19 +00:00
|
|
|
stdfile = fopen (filename.GetChars(), "rb");
|
2008-01-27 11:25:03 +00:00
|
|
|
if (stdfile != NULL)
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
PNGHandle *pngh = M_VerifyPNG(stdfile);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (pngh != NULL)
|
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
success = true;
|
2008-01-27 11:25:03 +00:00
|
|
|
delete pngh;
|
|
|
|
}
|
|
|
|
fclose(stdfile);
|
|
|
|
}
|
2008-02-20 16:51:40 +00:00
|
|
|
if (success)
|
|
|
|
{
|
|
|
|
if (longsavemessages) Printf ("%s (%s)\n", GStrings("GGSAVED"), filename.GetChars());
|
|
|
|
else Printf ("%s\n", GStrings("GGSAVED"));
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
else Printf(PRINT_HIGH, "Save failed\n");
|
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
BackupSaveName = filename;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
// We don't need the snapshot any longer.
|
|
|
|
if (level.info->snapshot != NULL)
|
|
|
|
{
|
|
|
|
delete level.info->snapshot;
|
|
|
|
level.info->snapshot = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
insave = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// DEMO RECORDING
|
|
|
|
//
|
|
|
|
|
|
|
|
void G_ReadDemoTiccmd (ticcmd_t *cmd, int player)
|
|
|
|
{
|
|
|
|
int id = DEM_BAD;
|
|
|
|
|
|
|
|
while (id != DEM_USERCMD && id != DEM_EMPTYUSERCMD)
|
|
|
|
{
|
|
|
|
if (!demorecording && demo_p >= zdembodyend)
|
|
|
|
{
|
|
|
|
// nothing left in the BODY chunk, so end playback.
|
|
|
|
G_CheckDemoStatus ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
id = ReadByte (&demo_p);
|
|
|
|
|
|
|
|
switch (id)
|
|
|
|
{
|
|
|
|
case DEM_STOP:
|
|
|
|
// end of demo stream
|
|
|
|
G_CheckDemoStatus ();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DEM_USERCMD:
|
|
|
|
UnpackUserCmd (&cmd->ucmd, &cmd->ucmd, &demo_p);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DEM_EMPTYUSERCMD:
|
|
|
|
// leave cmd->ucmd unchanged
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DEM_DROPPLAYER:
|
|
|
|
{
|
|
|
|
BYTE i = ReadByte (&demo_p);
|
|
|
|
if (i < MAXPLAYERS)
|
|
|
|
{
|
|
|
|
playeringame[i] = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
Net_DoCommand (id, &demo_p, player);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool stoprecording;
|
|
|
|
|
|
|
|
CCMD (stop)
|
|
|
|
{
|
|
|
|
stoprecording = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern BYTE *lenspot;
|
|
|
|
|
|
|
|
void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf)
|
|
|
|
{
|
|
|
|
BYTE *specdata;
|
|
|
|
int speclen;
|
|
|
|
|
|
|
|
if (stoprecording)
|
|
|
|
{ // use "stop" console command to end demo recording
|
|
|
|
G_CheckDemoStatus ();
|
|
|
|
if (!netgame)
|
|
|
|
{
|
|
|
|
gameaction = ga_fullconsole;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Write any special "ticcmds" for this player to the demo
|
|
|
|
if ((specdata = NetSpecs[player][buf].GetData (&speclen)) && gametic % ticdup == 0)
|
|
|
|
{
|
|
|
|
memcpy (demo_p, specdata, speclen);
|
|
|
|
demo_p += speclen;
|
|
|
|
NetSpecs[player][buf].SetData (NULL, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Now write out a "normal" ticcmd.
|
|
|
|
WriteUserCmdMessage (&cmd->ucmd, &players[player].cmd.ucmd, &demo_p);
|
|
|
|
|
|
|
|
// [RH] Bigger safety margin
|
|
|
|
if (demo_p > demobuffer + maxdemosize - 64)
|
|
|
|
{
|
|
|
|
ptrdiff_t pos = demo_p - demobuffer;
|
|
|
|
ptrdiff_t spot = lenspot - demobuffer;
|
|
|
|
ptrdiff_t comp = democompspot - demobuffer;
|
|
|
|
ptrdiff_t body = demobodyspot - demobuffer;
|
|
|
|
// [RH] Allocate more space for the demo
|
|
|
|
maxdemosize += 0x20000;
|
|
|
|
demobuffer = (BYTE *)M_Realloc (demobuffer, maxdemosize);
|
|
|
|
demo_p = demobuffer + pos;
|
|
|
|
lenspot = demobuffer + spot;
|
|
|
|
democompspot = demobuffer + comp;
|
|
|
|
demobodyspot = demobuffer + body;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_RecordDemo
|
|
|
|
//
|
|
|
|
void G_RecordDemo (char* name)
|
|
|
|
{
|
|
|
|
char *v;
|
|
|
|
|
|
|
|
usergame = false;
|
|
|
|
strcpy (demoname, name);
|
|
|
|
FixPathSeperator (demoname);
|
|
|
|
DefaultExtension (demoname, ".lmp");
|
2008-03-12 15:21:17 +00:00
|
|
|
v = Args->CheckValue ("-maxdemo");
|
2008-01-27 11:25:03 +00:00
|
|
|
maxdemosize = 0x20000;
|
|
|
|
demobuffer = (BYTE *)M_Malloc (maxdemosize);
|
|
|
|
|
|
|
|
demorecording = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// [RH] Demos are now saved as IFF FORMs. I've also removed support
|
|
|
|
// for earlier ZDEMs since I didn't want to bother supporting
|
|
|
|
// something that probably wasn't used much (if at all).
|
|
|
|
|
|
|
|
void G_BeginRecording (const char *startmap)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (startmap == NULL)
|
|
|
|
{
|
|
|
|
startmap = level.mapname;
|
|
|
|
}
|
|
|
|
demo_p = demobuffer;
|
|
|
|
|
|
|
|
WriteLong (FORM_ID, &demo_p); // Write FORM ID
|
|
|
|
demo_p += 4; // Leave space for len
|
|
|
|
WriteLong (ZDEM_ID, &demo_p); // Write ZDEM ID
|
|
|
|
|
|
|
|
// Write header chunk
|
|
|
|
StartChunk (ZDHD_ID, &demo_p);
|
|
|
|
WriteWord (DEMOGAMEVERSION, &demo_p); // Write ZDoom version
|
|
|
|
*demo_p++ = 2; // Write minimum version needed to use this demo.
|
|
|
|
*demo_p++ = 3; // (Useful?)
|
|
|
|
for (i = 0; i < 8; i++) // Write name of map demo was recorded on.
|
|
|
|
{
|
|
|
|
*demo_p++ = startmap[i];
|
|
|
|
}
|
|
|
|
WriteLong (rngseed, &demo_p); // Write RNG seed
|
|
|
|
*demo_p++ = consoleplayer;
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
|
|
|
|
// Write player info chunks
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
StartChunk (UINF_ID, &demo_p);
|
|
|
|
WriteByte ((BYTE)i, &demo_p);
|
|
|
|
D_WriteUserInfoStrings (i, &demo_p);
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// It is possible to start a "multiplayer" game with only one player,
|
|
|
|
// so checking the number of players when playing back the demo is not
|
|
|
|
// enough.
|
|
|
|
if (multiplayer)
|
|
|
|
{
|
|
|
|
StartChunk (NETD_ID, &demo_p);
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Write cvars chunk
|
|
|
|
StartChunk (VARS_ID, &demo_p);
|
|
|
|
C_WriteCVars (&demo_p, CVAR_SERVERINFO|CVAR_DEMOSAVE);
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
// Write weapon ordering chunk
|
|
|
|
StartChunk (WEAP_ID, &demo_p);
|
|
|
|
P_WriteDemoWeaponsChunk(&demo_p);
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// Indicate body is compressed
|
|
|
|
StartChunk (COMP_ID, &demo_p);
|
|
|
|
democompspot = demo_p;
|
|
|
|
WriteLong (0, &demo_p);
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
|
|
|
|
// Begin BODY chunk
|
|
|
|
StartChunk (BODY_ID, &demo_p);
|
|
|
|
demobodyspot = demo_p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_PlayDemo
|
|
|
|
//
|
|
|
|
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
FString defdemoname;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
void G_DeferedPlayDemo (char *name)
|
|
|
|
{
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
defdemoname = name;
|
2008-01-27 11:25:03 +00:00
|
|
|
gameaction = ga_playdemo;
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (playdemo)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1)
|
|
|
|
{
|
|
|
|
G_DeferedPlayDemo (argv[1]);
|
|
|
|
singledemo = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CCMD (timedemo)
|
|
|
|
{
|
|
|
|
if (argv.argc() > 1)
|
|
|
|
{
|
|
|
|
G_TimeDemo (argv[1]);
|
|
|
|
singledemo = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Process all the information in a FORM ZDEM
|
|
|
|
// until a BODY chunk is entered.
|
|
|
|
bool G_ProcessIFFDemo (char *mapname)
|
|
|
|
{
|
|
|
|
bool headerHit = false;
|
|
|
|
bool bodyHit = false;
|
|
|
|
int numPlayers = 0;
|
|
|
|
int id, len, i;
|
|
|
|
uLong uncompSize = 0;
|
|
|
|
BYTE *nextchunk;
|
|
|
|
|
|
|
|
demoplayback = true;
|
|
|
|
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
playeringame[i] = 0;
|
|
|
|
|
|
|
|
len = ReadLong (&demo_p);
|
|
|
|
zdemformend = demo_p + len + (len & 1);
|
|
|
|
|
|
|
|
// Check to make sure this is a ZDEM chunk file.
|
|
|
|
// TODO: Support multiple FORM ZDEMs in a CAT. Might be useful.
|
|
|
|
|
|
|
|
id = ReadLong (&demo_p);
|
|
|
|
if (id != ZDEM_ID)
|
|
|
|
{
|
|
|
|
Printf ("Not a ZDoom demo file!\n");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Process all chunks until a BODY chunk is encountered.
|
|
|
|
|
|
|
|
while (demo_p < zdemformend && !bodyHit)
|
|
|
|
{
|
|
|
|
id = ReadLong (&demo_p);
|
|
|
|
len = ReadLong (&demo_p);
|
|
|
|
nextchunk = demo_p + len + (len & 1);
|
|
|
|
if (nextchunk > zdemformend)
|
|
|
|
{
|
|
|
|
Printf ("Demo is mangled!\n");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (id)
|
|
|
|
{
|
|
|
|
case ZDHD_ID:
|
|
|
|
headerHit = true;
|
|
|
|
|
|
|
|
demover = ReadWord (&demo_p); // ZDoom version demo was created with
|
|
|
|
if (demover < MINDEMOVERSION)
|
|
|
|
{
|
|
|
|
Printf ("Demo requires an older version of ZDoom!\n");
|
|
|
|
//return true;
|
|
|
|
}
|
|
|
|
if (ReadWord (&demo_p) > DEMOGAMEVERSION) // Minimum ZDoom version
|
|
|
|
{
|
|
|
|
Printf ("Demo requires a newer version of ZDoom!\n");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
memcpy (mapname, demo_p, 8); // Read map name
|
|
|
|
mapname[8] = 0;
|
|
|
|
demo_p += 8;
|
|
|
|
rngseed = ReadLong (&demo_p);
|
|
|
|
FRandom::StaticClearRandom ();
|
|
|
|
consoleplayer = *demo_p++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case VARS_ID:
|
|
|
|
C_ReadCVars (&demo_p);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case UINF_ID:
|
|
|
|
i = ReadByte (&demo_p);
|
|
|
|
if (!playeringame[i])
|
|
|
|
{
|
|
|
|
playeringame[i] = 1;
|
|
|
|
numPlayers++;
|
|
|
|
}
|
|
|
|
D_ReadUserInfoStrings (i, &demo_p, false);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NETD_ID:
|
|
|
|
multiplayer = true;
|
|
|
|
break;
|
|
|
|
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
case WEAP_ID:
|
|
|
|
P_ReadDemoWeaponsChunk(&demo_p);
|
|
|
|
break;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
case BODY_ID:
|
|
|
|
bodyHit = true;
|
|
|
|
zdembodyend = demo_p + len;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case COMP_ID:
|
|
|
|
uncompSize = ReadLong (&demo_p);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bodyHit)
|
|
|
|
demo_p = nextchunk;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!numPlayers)
|
|
|
|
{
|
|
|
|
Printf ("Demo has no players!\n");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bodyHit)
|
|
|
|
{
|
|
|
|
zdembodyend = NULL;
|
|
|
|
Printf ("Demo has no BODY chunk!\n");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (numPlayers > 1)
|
|
|
|
multiplayer = netgame = netdemo = true;
|
|
|
|
|
|
|
|
if (uncompSize > 0)
|
|
|
|
{
|
|
|
|
BYTE *uncompressed = new BYTE[uncompSize];
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
int r = uncompress (uncompressed, &uncompSize, demo_p, uLong(zdembodyend - demo_p));
|
2008-01-27 11:25:03 +00:00
|
|
|
if (r != Z_OK)
|
|
|
|
{
|
|
|
|
Printf ("Could not decompress demo!\n");
|
|
|
|
delete[] uncompressed;
|
|
|
|
return true;
|
|
|
|
}
|
2008-02-20 16:51:40 +00:00
|
|
|
M_Free (demobuffer);
|
2008-01-27 11:25:03 +00:00
|
|
|
zdembodyend = uncompressed + uncompSize;
|
|
|
|
demobuffer = demo_p = uncompressed;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void G_DoPlayDemo (void)
|
|
|
|
{
|
|
|
|
char mapname[9];
|
|
|
|
int demolump;
|
|
|
|
|
|
|
|
gameaction = ga_nothing;
|
|
|
|
|
|
|
|
// [RH] Allow for demos not loaded as lumps
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
demolump = Wads.CheckNumForFullName (defdemoname, true);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (demolump >= 0)
|
|
|
|
{
|
|
|
|
int demolen = Wads.LumpLength (demolump);
|
2008-02-20 16:51:40 +00:00
|
|
|
demobuffer = (BYTE *)M_Malloc(demolen);
|
2008-01-27 11:25:03 +00:00
|
|
|
Wads.ReadLump (demolump, demobuffer);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FixPathSeperator (defdemoname);
|
|
|
|
DefaultExtension (defdemoname, ".lmp");
|
|
|
|
M_ReadFile (defdemoname, &demobuffer);
|
|
|
|
}
|
|
|
|
demo_p = demobuffer;
|
|
|
|
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
Printf ("Playing demo %s\n", defdemoname.GetChars());
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
C_BackupCVars (); // [RH] Save cvars that might be affected by demo
|
|
|
|
|
|
|
|
if (ReadLong (&demo_p) != FORM_ID)
|
|
|
|
{
|
|
|
|
const char *eek = "Cannot play non-ZDoom demos.\n(They would go out of sync badly.)\n";
|
|
|
|
|
2009-03-09 21:19:56 +00:00
|
|
|
C_ForgetCVars();
|
2008-12-06 23:37:13 +00:00
|
|
|
M_Free(demobuffer);
|
|
|
|
demo_p = demobuffer = NULL;
|
2008-01-27 11:25:03 +00:00
|
|
|
if (singledemo)
|
|
|
|
{
|
2009-02-05 00:06:30 +00:00
|
|
|
I_Error ("%s", eek);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-02-05 00:06:30 +00:00
|
|
|
Printf (PRINT_BOLD, "%s", eek);
|
2008-01-27 11:25:03 +00:00
|
|
|
gameaction = ga_nothing;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (G_ProcessIFFDemo (mapname))
|
|
|
|
{
|
2008-12-06 23:37:13 +00:00
|
|
|
C_RestoreCVars();
|
2008-01-27 11:25:03 +00:00
|
|
|
gameaction = ga_nothing;
|
|
|
|
demoplayback = false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// don't spend a lot of time in loadlevel
|
|
|
|
precache = false;
|
|
|
|
demonew = true;
|
|
|
|
G_InitNew (mapname, false);
|
|
|
|
C_HideConsole ();
|
|
|
|
demonew = false;
|
|
|
|
precache = true;
|
|
|
|
|
|
|
|
usergame = false;
|
|
|
|
demoplayback = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// G_TimeDemo
|
|
|
|
//
|
|
|
|
void G_TimeDemo (char* name)
|
|
|
|
{
|
2008-03-12 15:21:17 +00:00
|
|
|
nodrawers = !!Args->CheckParm ("-nodraw");
|
|
|
|
noblit = !!Args->CheckParm ("-noblit");
|
2008-01-27 11:25:03 +00:00
|
|
|
timingdemo = true;
|
|
|
|
singletics = true;
|
|
|
|
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
defdemoname = name;
|
2008-01-27 11:25:03 +00:00
|
|
|
gameaction = ga_playdemo;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===================
|
|
|
|
=
|
|
|
|
= G_CheckDemoStatus
|
|
|
|
=
|
|
|
|
= Called after a death or level completion to allow demos to be cleaned up
|
|
|
|
= Returns true if a new demo loop action will take place
|
|
|
|
===================
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool G_CheckDemoStatus (void)
|
|
|
|
{
|
|
|
|
if (!demorecording)
|
|
|
|
{ // [RH] Restore the player's userinfo settings.
|
|
|
|
D_SetupUserInfo();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (demoplayback)
|
|
|
|
{
|
|
|
|
extern int starttime;
|
|
|
|
int endtime = 0;
|
|
|
|
|
|
|
|
if (timingdemo)
|
|
|
|
endtime = I_GetTime (false) - starttime;
|
|
|
|
|
|
|
|
C_RestoreCVars (); // [RH] Restore cvars demo might have changed
|
2008-02-20 16:51:40 +00:00
|
|
|
M_Free (demobuffer);
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
|
|
|
|
P_SetupWeapons_ntohton();
|
2008-01-27 11:25:03 +00:00
|
|
|
demoplayback = false;
|
|
|
|
netdemo = false;
|
|
|
|
netgame = false;
|
|
|
|
multiplayer = false;
|
|
|
|
singletics = false;
|
- version bump to 1.2.0.
- fixed: Some of the dynamic light definitions for Hexen's switchable items were not correct.
- fixed: Weapon sprites were all drawn fullbright if only one of the layers was set to bright.
Update to ZDoom r1456 (2.3.0 plus one additional fix):
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
3DMidtex textures (and 3D-floors.)
- Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
disappearing abruptly.
- Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical
momentum the initial pull is supposed to be twice as strong as when
vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes.
There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small
Raven health item, 2 a large Raven health item and 3 a Strife item.
- Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.
- fixed: nextmap and nextsecret CCMDs set skill to 0.
- fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.
- The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
the water effect is now applied after any room reverb, rather than in
parallel with it.
- Fixed: UI sounds should not have reverb applied to them.
- Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
cause problems with things like the chainsaw where the sound is stopped and
immediately restarted, causing occassional gaps between the stopping of the
sound and the starting of the new one. (I added the start synchronization to
combat flanging of paired moving polyobjects when moving around, but I think
just removing velocity from the player for sound calculations takes care of
that well enough.)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.
- Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
conversation by pressing Escape.
- added ML_BLOCKPROJECTILE flag to lines.
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.
- Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
to possibly compress. (Maybe make the whole thing one long, never-ending
zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
boundaries? That would probably help the compression ratio, but it would
require changing the way the netcode determines sequence, which would be
a much more invasive change.)
- Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.
- Fixed: The StrifePlayer was missing a RunHealth setting.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@303 b0f79afe-0144-0410-b225-9a4edf0717df
2009-03-01 10:19:26 +00:00
|
|
|
for (int i = 1; i < MAXPLAYERS; i++)
|
|
|
|
playeringame[i] = 0;
|
2008-01-27 11:25:03 +00:00
|
|
|
consoleplayer = 0;
|
|
|
|
players[0].camera = NULL;
|
|
|
|
StatusBar->AttachToPlayer (&players[0]);
|
|
|
|
|
|
|
|
if (singledemo || timingdemo)
|
|
|
|
{
|
|
|
|
if (timingdemo)
|
|
|
|
{
|
|
|
|
// Trying to get back to a stable state after timing a demo
|
|
|
|
// seems to cause problems. I don't feel like fixing that
|
|
|
|
// right now.
|
|
|
|
I_FatalError ("timed %i gametics in %i realtics (%.1f fps)\n"
|
|
|
|
"(This is not really an error.)", gametic,
|
|
|
|
endtime, (float)gametic/(float)endtime*(float)TICRATE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf ("Demo ended.\n");
|
|
|
|
}
|
|
|
|
gameaction = ga_fullconsole;
|
|
|
|
timingdemo = false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
D_AdvanceDemo ();
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (demorecording)
|
|
|
|
{
|
|
|
|
BYTE *formlen;
|
|
|
|
|
|
|
|
WriteByte (DEM_STOP, &demo_p);
|
|
|
|
|
|
|
|
if (demo_compress)
|
|
|
|
{
|
|
|
|
// Now that the entire BODY chunk has been created, replace it with
|
|
|
|
// a compressed version. If the BODY successfully compresses, the
|
|
|
|
// contents of the COMP chunk will be changed to indicate the
|
|
|
|
// uncompressed size of the BODY.
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
uLong len = uLong(demo_p - demobodyspot);
|
2008-01-27 11:25:03 +00:00
|
|
|
uLong outlen = (len + len/100 + 12);
|
|
|
|
Byte *compressed = new Byte[outlen];
|
|
|
|
int r = compress2 (compressed, &outlen, demobodyspot, len, 9);
|
|
|
|
if (r == Z_OK && outlen < len)
|
|
|
|
{
|
|
|
|
formlen = democompspot;
|
|
|
|
WriteLong (len, &democompspot);
|
|
|
|
memcpy (demobodyspot, compressed, outlen);
|
|
|
|
demo_p = demobodyspot + outlen;
|
|
|
|
}
|
|
|
|
delete[] compressed;
|
|
|
|
}
|
|
|
|
FinishChunk (&demo_p);
|
|
|
|
formlen = demobuffer + 4;
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
WriteLong (int(demo_p - demobuffer - 8), &formlen);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
Update to ZDoom r1585:
- Added ACS GetChar function.
- Added Gez's submission for polyobjects being able to crush corpses but made
it an explicit MAPINFO option only.
- Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
- fixed a few Heretic actors:
* The pod generator's attacksound was wrong
* The teleglitter generators need different flags if they are supposed to work
with z-aware spawning of the glitter.
* The knight's axes need the THRUGHOST flag.
- Fixed non-POD passing in G_BuildSaveName() and other things GCC warned
about.
- Added support for imploded zips.
- Fixed: Some missile spawning functions ignored the FastSpeed setting.
- Fixed: P_CheckSwitchRange tried to access a line's backsector without
checking if it is valid.
- Fixed: Fast projectile could not be frozen by the Time freezer.
- Added several new ACS functions: GetActorMomX/Y/Z, GetActorViewHeight,
SetActivator, SetActivatorToTarget.
- Added Species property for actors and separated Hexen's Demon1 and Demon2
into different species.
- Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
"misc/podgrow".
- Added transference of a select few flags from PowerProtection to its owner.
- Added actor type parameters to A_PodPain() and A_MakePod().
- The savegame path is now passed through NicePath(), since it's user-
specifiable.
- Added save_dir cvar. When non-empty, it controls where savegames go.
- SBARINFO update:
* Added the ability to center things with fullscreenoffsets enabled. Due
to some limitations the syntax is [-]<integer> [+ center].
* Fixed: the translucent flag on drawinventorybar didn't work quite right.
* Fixed: Extremely minor inaccuracy in the Doom SBarInfo code. The
fullscreen inventory bar wasn't scaled correctly.
- fixed: The CHECKSWITCHRANGE line flag was ignored for one sided lines.
- Added more compatibility settings, submitted by Gez.
- Fixed: Doom's fullscreen HUD was limited to 6 keys.
- Made 'next endgame' work again for cases where it is supposed to be
the same as 'next endgame4'.
- GCC nitpick fix: Classes being used as template parameters may not be
defined locally in a function. Fixed FWadFile::SetNamespace for that.
- Improved error reporting for incorrect textures in maps.
- Fixed: When music was stopped this was not set in the global music state.
- Fixed: Friendly monsters did not target enemy players in deathmatch.
- Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.
- Maps defined with Hexen-style MAPINFOs now run their scripts in the proper
order.
- Fixed: FWadCollection::CheckNumForName() read the lump each iteration before
checking for the end marker. On 32-bit systems, this is -1, but on 64-bit
systems, it is a very large integer that is highly unlikely to be in mapped
memory.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@325 b0f79afe-0144-0410-b225-9a4edf0717df
2009-05-15 18:02:01 +00:00
|
|
|
M_WriteFile (demoname, demobuffer, int(demo_p - demobuffer));
|
2008-02-20 16:51:40 +00:00
|
|
|
M_Free (demobuffer);
|
2008-01-27 11:25:03 +00:00
|
|
|
demorecording = false;
|
|
|
|
stoprecording = false;
|
|
|
|
Printf ("Demo %s recorded\n", demoname);
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|