summaryrefslogtreecommitdiff
path: root/src/strife/g_game.c
AgeCommit message (Collapse)Author
2015-05-08warnings: fix "redundant redeclaration of ‘player_names’"Fabian Greffrath
The "extern char player_names[8][16]" array is already declared in hu_stuff.h:59.
2015-01-19Add extra checks to weapon cycling loops.Simon Howard
Ensure that the loops to find the next weapon always terminate - even if there are somehow no weapons equipped. Also, only ever do weapon cycling when in the GS_LEVEL gamestate. This fixes #503 - thanks to Fabian and raithe on Doomworld.
2014-10-24Upstream fix 1James Haley
Same fix applied to wp_torpedo selection in P_PlayerThink must also be applied to weapon rotation code in g_game
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-04-30strife: Fix joystick jump button.Simon Howard
The code to handle the joystick jump button variable was not implemented. Check the jump button on the joystick as well as the keyboard and mouse button equivalents when deciding whether to set the jump bit.
2014-04-19joystick: Add an axis to allow strafing.Simon Howard
Modern gamepads typically have 2-3 D-pads and joysticks. This means that it's desirable to be able to use one joystick for turning and another for strafing. Add another axis in addition to the current X and y axes that performs strafe movement.
2014-04-01Replace all snprintf() calls with M_snprintf().Simon Howard
The Windows API has an _snprintf function that is not the same as Unix's snprintf(): if the string is truncated then no trailing NUL character is appended. This makes the function unsafe. Define a replacement/wrapper called M_snprintf that works the same but always appends a trailing NUL, for safety on Windows and other OSes that behave like this. Do the same thing for vsnprintf(), and update HACKING to list snprintf/vsnprintf as forbidden functions. This fixes #375; thanks to Quasar for pointing out the different behavior of these functions.
2014-03-30strife: Eliminate use of sprintf().Simon Howard
Use snprintf() in place of sprintf(). This is part of fixing #371.
2014-03-29strife: Eliminate use of unsafe string functions.Simon Howard
Eliminate use of strcpy, strcat, strncpy, and use the new safe alternatives.
2014-03-24Fix various Clang compiler warnings.Simon Howard
2014-03-17Allow for PNG screenshots.Fabian Greffrath
2013-11-03Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2742
2013-11-02* Fixed deathmatch spots error message to match binary (why'd theyJames Haley
change it?) * Made attribution timestamps consistent in g_game.c Subversion-branch: /branches/v2-branch Subversion-revision: 2739
2013-09-15Hopefully complete implementation of player names and Strife player chatJames Haley
features, which work differently than they did in DOOM. If working properly, then this fully completes Chocolate Strife, aside from any presently unknown issues. Subversion-branch: /branches/v2-branch Subversion-revision: 2646
2013-08-10Tweak Strife documentation comments.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2612
2013-03-24Initial docgen changes to generate manpages for Heretic, Hexen, Strife.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2568
2012-02-10Remove all temporary code that was put in place until MAXPLAYERS becameJames Haley
8 rather than 4 (unfortunately this was NOT accounted for in the save code). Subversion-branch: /branches/v2-branch Subversion-revision: 2498
2011-10-29Enable gcc warning to detect redundant declarations, and clean upSimon Howard
instances of this within the code (thanks Edward-san). Subversion-branch: /branches/v2-branch Subversion-revision: 2468
2011-10-13Update Strife main loop code to use d_loop.c common main loop code.Simon Howard
Working multiplayer! Subversion-branch: /branches/v2-branch Subversion-revision: 2416
2011-09-25Fix Strife weapon-cycling rules.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2402
2011-09-24Rework Strife -testcontrols code to use common code.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2397
2011-06-04Resolved some TODOs and fixed a couple of problem spots that wereJames Haley
forgotten. Subversion-branch: /branches/strife-branch Subversion-revision: 2344
2011-02-12Merge from raven-branch. FEATURE_MULTIPLAYER has been disabledSimon Howard
temporarily until the netgame changes on raven-branch are finished. Subversion-branch: /branches/strife-branch Subversion-revision: 2259
2011-02-12Savegame code complete, hubs functional. Chocolate Strife is playable!James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2255
2011-02-10Restarted work on hub save code. Brought in multiple filepath handlingJames Haley
routines from Eternity. Subversion-branch: /branches/strife-branch Subversion-revision: 2252
2011-02-06Numerous fixes/adjustments: removed bodyque, restored "is turbo" (foundJames Haley
it in there after all), removed some dead code in p_dialog, added a 'default: break;' case in EV_VerticalDoor, initialize player_t::allegiance in P_SetupLevel, minor changes to EV_Teleport, 2nd-pass verification for p_tick, and big fixes in p_user.c including noclip cheat, viewz clipping against floor, air control thrust amount, and missing/incorrect else's. Subversion-branch: /branches/strife-branch Subversion-revision: 2250
2011-02-05Documented most of the questflags. Misc fixes: Removed "is turbo!"James Haley
message, PST_REBORN set in G_DoLoadLevel if players.health <= 0, M_ClearRandom doesn't seed rndindex with time(), A_Chase doesn't check for target->health <= 0 when decrementing actor->threshold, and A_AcolyteSpecial fixed - ALL blue acolytes must be dead, not just one. Subversion-branch: /branches/strife-branch Subversion-revision: 2248
2010-10-04Added mobjinfo/state adjustments for various skill levels. Changed skyJames Haley
handling. Fixed bug that made you switch to the electric crossbow if you received poison bolt ammo (you should not switch to anything at all when this happens). Some more commented-out savegame code added. Subversion-branch: /branches/strife-branch Subversion-revision: 2154
2010-10-03Eliminated the rest of the notion of an episode, added proper skyJames Haley
setting, and other misc code in g_game. Also started *trying* to add new savegame code in g_game, but this is a just about a lost cause without any portable filepath handling support from the engine. Subversion-branch: /branches/strife-branch Subversion-revision: 2152
2010-09-29Significant work on savegames.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2150
2010-09-27Code for line types 196 and 212 (thought I committed that already o_O),James Haley
and code to transfer leveltime across map changes in G_DoWorldDone. Subversion-branch: /branches/strife-branch Subversion-revision: 2144
2010-09-25+ stonecold, jimmy, gripper, donnytrump, and lego cheats addedSamuel Villareal
Subversion-branch: /branches/strife-branch Subversion-revision: 2138
2010-09-22Added linetype 180 to P_ShootSpecialLine and vetted other line types.James Haley
Removed episode parameter from G_DeferedInitNew, started work on the "Name Your Character" menu, and adjusted the temporary code in M_ChooseSkill so that the game starts in Tarnhill rather than in the Sanctuary. Subversion-branch: /branches/strife-branch Subversion-revision: 2131
2010-09-22P_CrossSpecialLine is approximately 95% complete.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2129
2010-09-18More use of DEH_String and DEH_snprintf, especially in the dialogJames Haley
engine. Also more use of new GiveVoiceObjective macro. Subversion-branch: /branches/strife-branch Subversion-revision: 2111
2010-09-17Vetted all existing floor types and modified/added ones which changed.James Haley
Finished up line type 145, WR Exit Level to Spot, and added the G_RiftPlayer call to G_DoWorldDone. Subversion-branch: /branches/strife-branch Subversion-revision: 2096
2010-09-16Work on cheats and on teleportation effects.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2091
2010-09-14Fully implemented all finale code, including "intermission" speeches byJames Haley
Macil and all three endings. Subversion-branch: /branches/strife-branch Subversion-revision: 2086
2010-09-13+ P_DamageMobj mapped outSamuel Villareal
+ Fixed crash in G_DoReborn Subversion-branch: /branches/strife-branch Subversion-revision: 2080
2010-09-13+ stonecold/workparm variables addedSamuel Villareal
+ quest enum added + P_damagemobj partially done + P_SpawnPlayer/G_PlayerReborn updated Subversion-branch: /branches/strife-branch Subversion-revision: 2079
2010-09-11+ P_RemoveInventoryItem and P_DropInventoryItem implementedSamuel Villareal
+ Some inventory keys supported Subversion-branch: /branches/strife-branch Subversion-revision: 2060
2010-09-09Merge from raven-branch.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2051
2010-09-08Small comment change, tabs out of M_Responder for editability.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2043
2010-09-07+ P_DialogStart implementedSamuel Villareal
+ Dialogs are now loaded through G_DoLoadLevel Subversion-branch: /branches/strife-branch Subversion-revision: 2033
2010-09-05Corrections to some of Kaiser's previous commits. Also, significant workJames Haley
on dialog engine, p_enemy code, and support for all new mapthing_t flag values in P_SpawnMapThing. Subversion-branch: /branches/strife-branch Subversion-revision: 2015
2010-09-04+ Map flags for things added (MTF_*)Samuel Villareal
+ A_FireGrenade and A_MissileTick codepointers added + Step up height changed to 16*FRACUNIT (non-human things are excluded) + Fixed bug in P_MovePlayer where player cannot climb over things when pressing forward and jumping. Missed a line of code for this + P_SpawnSubMissile renamed to P_SpawnFaceMissile + P_SpawnMortar added + Ammo types added + Fixed some inaccuracies in P_SpawnBlood Subversion-branch: /branches/strife-branch Subversion-revision: 2008
2010-09-03+ More button flags added to buttoncode_eSamuel Villareal
+ Looking/jumping implemented + Jump/look/center keys supported + Strife mouse firing bug implemented Subversion-branch: /branches/strife-branch Subversion-revision: 2003
2010-08-31+ Stripped out all doom states/sprites and added strife states/sprites.Samuel Villareal
All strife codepointers are set as placeholders + Strife weapons implemented + All state references commented out + All weapon references commented out Subversion-branch: /branches/strife-branch Subversion-revision: 1984
2010-08-31Revamped player_t to match binary layout of structure, aside fromJames Haley
enum-determined arrays which will be tackled individually. Removed player itemcount, secretcount, and didsecret fields. Changed armorpoints, armortype, and killcount to shorts. Added all runtime Strife sector types and changed handling of DOOM types where appropriate. Added nukagecount handling in P_PlayerThink. Subversion-branch: /branches/strife-branch Subversion-revision: 1981
2010-08-30+ Change to patch/maptexture data structureSamuel Villareal
+ Disabling all animdefs and switchdefs for now + Setting sky texture to use SKY03 as a placeholder Subversion-branch: /branches/strife-branch Subversion-revision: 1977