summaryrefslogtreecommitdiff
path: root/src/strife/p_inter.c
AgeCommit message (Collapse)Author
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.
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-03-02Big bug fix: player->damage is not capped on the low end to 0 inJames Haley
P_DamageMobj. This means you *do* have to heal negative damage when auto-using inventory, and is why telefrags can still insta-kill you in vanilla - they were NOT doing so previously. Subversion-branch: /branches/v2-branch Subversion-revision: 2563
2013-02-25Portability tweak when adding quest flags from collected items, due toJames Haley
the Broken Power Coupling's anomalous speed value of 512*FRACUNIT (verified against binary). Added note about this in the quest flags enumeration as well; bit 31 (quest #32) is accidentally set by this item, but is never checked for anywhere. Subversion-branch: /branches/v2-branch Subversion-revision: 2560
2012-04-02Fix to undefined sprintf behavior in the dialog engine (thanks toJames Haley
MP2E!). Other changes are to comments only. Subversion-branch: /branches/v2-branch Subversion-revision: 2509
2011-03-02Fixed automap background color, size of plrkilledmsg buffer, a bug whichJames Haley
caused the scanner to never be depleted from the inventory, and emulation of seemingly inconsequential undefined behavior in P_XYMovement via use of negative numspechit is currently addressed by changing the branch condition to > 0. Subversion-branch: /branches/strife-branch Subversion-revision: 2286
2011-02-26Fix for problem of not changing to new Sigil type properly whenJames Haley
receiving one via P_KillMobj item drops. Subversion-branch: /branches/strife-branch Subversion-revision: 2280
2011-02-26P_GiveBody seems to need a P_SubstNullMobj, otherwise a crash occurs inJames Haley
P_DestroyConverter when it tries to give items to players that aren't in the game... needs add'l verification. Also fixed first frame of the good ending (how the hell did that get screwed up??) Subversion-branch: /branches/strife-branch Subversion-revision: 2279
2011-02-23Removed all dead code containing P_Random calls to avoid false hits inJames Haley
list, removed all remaining order-of-evaluation portability problems, and heavily altered behavior of T_FireFlicker thinkers to match the binary (had no clue they changed this previously!). Subversion-branch: /branches/strife-branch Subversion-revision: 2274
2011-02-07Added graphical intro loading screen, and -nograph parameter whichJames Haley
disables it. Made most D_DoomMain messages dependent on -devparm. wipegamestate should start == 1, which is currently GS_UNKNOWN. Changed -wart behavior. Verified *no* changes in Strife to p_sight.c. Subversion-branch: /branches/strife-branch Subversion-revision: 2251
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
2011-02-04Finished second sweep of p_inter.c for missed code and bugs. SignificantJames Haley
adjustments and cleanup for P_DamageMobj, including "horror" predicate for spectral damage, missing target->target assignment for players, and use of the wrong mobj_t for R_PointToAngle2 when doing hookshot damage. Subversion-branch: /branches/strife-branch Subversion-revision: 2246
2010-10-05Fix for menu messages - unpause when dismissed.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2159
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-09-28Fix warnings about unhandled enumeration values.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2148
2010-09-26Identified quest #7 (killed Blue Acolytes), fixed a bug in P_SpawnMobjJames Haley
(Strife doesn't withhold mobj->reactioncount in skill 5), added static line specials 142, 143, and 149 for vertical texture scrolling, and made note of a bug with Irale's door line type. Subversion-branch: /branches/strife-branch Subversion-revision: 2142
2010-09-24Fixes for P_GiveBody.James Haley
Subversion-branch: /branches/strife-branch Subversion-revision: 2133
2010-09-22Rewrote P_GiveItemToPlayer to exactly match binary, particularly withJames Haley
treatment of SPR_TOKN objects, and playing proper sounds for different item types. Fixed most S_StartSound calls in the menu engine. Removed call to S_StopSound in S_StartSound, as Strife doesn't do it. Added call to P_DialogDoChoice(-1) in M_Responder when menuindialog is asserted and the menu exit key is pressed. Subversion-branch: /branches/strife-branch Subversion-revision: 2130
2010-09-21Working health bars on the status bar, and numerous fixes toJames Haley
P_TouchSpecialThing. Subversion-branch: /branches/strife-branch Subversion-revision: 2127
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-18Tons of warnings fixed - now only 7 warnings at warning level 3, andJames Haley
most of those are outside of our own code (get on those signed/unsigned mismatches in the midi code, fraggle ;) Subversion-branch: /branches/strife-branch Subversion-revision: 2110
2010-09-18Revisions to objective macro and addition of voice with objective forJames Haley
super-shortcut. Implemented A_BossDeath - needs moar testing! Resolved conflict with p_inter.c. Subversion-branch: /branches/strife-branch Subversion-revision: 2107
2010-09-18+ Change in P_DamageMobj due to fluke with specrtal checksSamuel Villareal
+ P_TouchSpecialThing updated to damage toucher if special's flag is spectral Subversion-branch: /branches/strife-branch Subversion-revision: 2106
2010-09-18+ A_Tracer, A_BurnSpread and A_AcolyteSpecial doneSamuel Villareal
+ Macro added for giving objective logs Subversion-branch: /branches/strife-branch Subversion-revision: 2100
2010-09-16Some reformatting, change of some strings to use DEH_String andJames Haley
DEH_snprintf. Implemented proper logic for Shadowarmor that was missing from P_GivePower, and added the code for making psprites translucent and/or godmode-colormapped in R_DrawPSprite. Subversion-branch: /branches/strife-branch Subversion-revision: 2089
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-13Use DEH_snprintf where appropriate.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 2083
2010-09-13Started finale slideshow stuff, added/tweaked quest flags, and did someJames Haley
elimination of tabs in altered functions. Also refactored a few strings to use DEH_String. Subversion-branch: /branches/strife-branch Subversion-revision: 2082
2010-09-13+ Fix for flaming death in P_KillMobjSamuel Villareal
+ Attackdistance fix for A_FireMauler1 Subversion-branch: /branches/strife-branch Subversion-revision: 2081
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-12+ Minor fix for P_KillMobj. Suppose to make the player hop slightly whenSamuel Villareal
killed Subversion-branch: /branches/strife-branch Subversion-revision: 2075
2010-09-12+ Fixes for the power couplingSamuel Villareal
Subversion-branch: /branches/strife-branch Subversion-revision: 2073
2010-09-12+ P_KillMobj mapped outSamuel Villareal
+ P_IsMobjBoss implemented + Externalized mission_objective + plrkilledmsg added Subversion-branch: /branches/strife-branch Subversion-revision: 2072
2010-09-12+ Items can be picked up nowSamuel Villareal
+ Fixed targeter x/y offsets + Pickup Armor/Health/Ammo/Weapon updates Subversion-branch: /branches/strife-branch Subversion-revision: 2067
2010-09-11+ P_GivePower updateSamuel Villareal
+ Power tics implemented + Power enums implemented + More inventory functions implemented Subversion-branch: /branches/strife-branch Subversion-revision: 2061
2010-09-04+ p_pspr.c almost completed. Needs A_FireSigil to be implementedSamuel Villareal
+ ammo arrays updated + All codepointers (except a_firesigil) added + Additional enumerations added to psprites Subversion-branch: /branches/strife-branch Subversion-revision: 2010
2010-09-02+ Thing z height clipping code addedSamuel Villareal
+ Renamed MF_SKULLFLY to MF_BOUNCE + Updated P_ZMovement with Strife changes + Updates to PIT_CheckThing + Removed most references to MF_SKULLFLY Subversion-branch: /branches/strife-branch Subversion-revision: 1995
2010-08-31+ All doom mobjtypes commented out or replaced as placeholdersSamuel Villareal
+ Strife mobjinfo structure filled + strife mobj flags added Subversion-branch: /branches/strife-branch Subversion-revision: 1985
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-31+ Strife music/sound implementedSamuel Villareal
+ All doom sound references replaced with sfx_swish as placeholder + Removed all but MT_PLAYER mobjinfo in mobjinfo struct Subversion-branch: /branches/strife-branch Subversion-revision: 1980
2010-02-01Create strife directory as a copy of doom directory, change Makefile.amSimon Howard
to build libstrife.a rather than libdoom.a, add chocolate-strife to src/Makefile.am. Subversion-branch: /branches/strife-branch Subversion-revision: 1840
2010-02-01Remove improperly-created strife directory.Simon Howard
Subversion-branch: /branches/strife-branch Subversion-revision: 1839
2010-02-01Populated src/strife with copy of source files from src/doom - TODOs:James Haley
needs own Makefile.am, and eventual removal of modules not used by Strife / addition of modules not sharable with Doom. Subversion-branch: /branches/strife-branch Subversion-revision: 1838