summaryrefslogtreecommitdiff
path: root/src/strife
AgeCommit message (Collapse)Author
2015-06-03Fix demo desyncs caused by P_RunThinkers() change.Simon Howard
1bcff874c52a changed the behavior of P_RunThinkers() to avoid dereferencing thinker pointers after they had been freed, but the modified version of the function was not logically equivalent to Vanilla version, because the 'next' pointer can be changed by the thinker function if one is invoked. This fixes a desync in tnt-speed-movie-0443131.lmp. Thanks to Zvonimir Bužanić for the bug report and Fabian Greffrath for reporting. Fixes #547.
2015-05-27Merge pull request #516 from khokh2001/oldoplSimon Howard
Older DMX's OPL voice allocation algorithm
2015-05-10Merge branch 'master' of github.com:chocolate-doom/chocolate-doomSimon Howard
2015-05-10Add back the Doom PWAD reload hack.Simon Howard
This was removed back in d190b596c566394717324296cbf6b46e67c64f5c; at the time I didn't understand what it was or how it was supposed to be used - it seemed like cruft left over from Doom's development. It is actually a potentially useful feature for level authors when developing their maps. See here: http://doomwiki.org/wiki/Reload_hack The reload hack is a relatively obscure feature of limited usefulness nowadays, but nonetheless a technical curiosity that ought to be preserved in Chocolate Doom. The reimplementation here is a lot cleaner than the original version from the source release: W_Reload() is based on a call to W_AddFile(), we don't reopen the reload file every time we want to read a lump, and we include a check in W_AddFile() that we are not trying to use the hack on more than one PWAD file. This fixes #539.
2015-05-08warnings: fix "variable ‘..’ set but not used" warningsFabian Greffrath
Fixed by commenting out the reported variables and their settings instead of removing them. Since I am not sure if they were added by mistake or by purpose and then overseen, I think it's better to keep them in the code but not compile them in for now.
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-05-04warnings: fix some cast to/from pointer from/to int warningsFabian Greffrath
This fixes the following two warnings cast from pointer to integer of different size cast to pointer from integer of different size by either changing some ints that are supposed to hold pointers to intptr_t type or by intermediate casting to (intptr_t).
2015-05-01Perform case-insensitive check for .lmp extension.Simon Howard
When using the -playdemo parameter, we support a convenience feature where the .lmp extension is not appended if it is already part of the filename. This makes tab completion much nicer. But if the .lmp file has a filename that is in all-caps (.LMP) we were still appending the extension because the check was case sensitive. Change the check to be case insensitive. This fixes #501 (thanks Ioan Chera).
2015-04-26Don't read currentthinker->next after Z_Free().Simon Howard
Save the next pointer in the P_RunThinkers() loop when iterating through thinkers, so that if the current thinker is freed we can still advance to the next thinker without dereferencing freed memory.
2015-03-26Add a wrapper with "void (void)" signature around G_CheckDemoStatusFabian Greffrath
This is meant to be passed over to I_AtExit() which expects an argument of void type. It thus prevents undefined behaviour because of the different signature of G_CheckDemoStatus() which is of boolean type. Fixes #519
2015-03-09Hexen and Heretic use older DMX. Since OPL Voice Allocating algorithm ↵khokh2001
differ. This commit adds old DMX's voice allocating alogrithm for Hexen and Heretic.
2015-02-20Strife sound priority fixJames Haley
The Strife binary has another priority check in the first loop inside S_GetChannel. TODO: Does DOS Doom have this as well? Find out. Resolves issue #506.
2015-02-20Refactor config file API.Simon Howard
The config file API previously relied on binding config variables using M_BindVariable() which took a void pointer. It occurred to me that if used on a boolean variable, this would be erroneous, but the void pointer would make it impossible to tell. Split this into separate M_Bind{Foo}Variable() functions based on type, which allows for proper type checking on the pointers that are passed. Vaguely related to #509.
2015-02-20Fix game code that makes false boolean assumptions.Simon Howard
Various bits of code assume that booleans are represented as 32-bit ints and that they can be assigned to from 32-bit values. This isn't true on all systems; fix code that does this to convert to boolean values properly. This is more progress towards fixing #509.
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-12-26allow building in subdirectory or outside source directoryDave Murphy
2014-12-18Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doomFabian Greffrath
2014-12-18fix a bug that causes monsters to become partly invisibleFabian Greffrath
when walking inside liquids like water -- on big-endian systems Originally reported by Ronald Lasmanowicz and fixed in his wii-hexen port: https://code.google.com/p/wii-hexen/source/detail?r=17
2014-12-16strife: Fix the name of MAP29, should be "Entity's Lair"Mike Swanson
Double-checked with strife1.exe
2014-12-15Upstream fix from SVE: MF_MVIS flagJames Haley
The MVIS flag, if set on an object *without* MF_SHADOW, imparts total invisibility. This is the intended effect on players using double Shadow Armors.
2014-12-15Upstream fix from SVE: Missing break statementJames Haley
This caused Rowan to fail to take Beldin's ring from you, if and only if you had full bullet ammo. Transcription error from the disassembly.
2014-11-01Remove unreferenced "grid" variableJames Haley
And yes I double checked the commit target this time.
2014-11-01Automap accuracy fixes (against proper game)James Haley
* Grid is not supported and gives no such message * Spot marking is substantially different
2014-11-01Revert "Automap accuracy fixes"James Haley
This reverts commit 12ecb4550e46ffdc28248be185738a88be033afd.
2014-11-01Automap accuracy fixesJames Haley
* Grid is not supported and gives no such message * Spot marking behavior is substantially different
2014-10-27Default screenblocks 10, not 9James Haley
Resolves #196
2014-10-27Missed change for startskill initJames Haley
Resolves #433
2014-10-26Another teleport beacon correctionJames Haley
Flag to be cleared is MF_SPECIAL, not MF_SOLID (verified against disassembly). Otherwise you get to spawn an infinite number of rebels from one beacon. Not to mention, it isn't SOLID to start with.
2014-10-26Rogue fixed DOOM bug regarding switch sound originsJames Haley
Re-examination of assembly reveals use of &line->frontsector->soundorg instead of buttonlist->soundorg.
2014-10-25Must allow HU_CHANGENAME in chat_dest rangeJames Haley
Verified against disassembly. Otherwise, other side does not see name changes as anything other than a message.
2014-10-24Fix 4: Changing player name on local clientJames Haley
Totally left out one of the two sprintf calls found in HU_Responder which is responsible for setting the player's name on the consoleplayer node (other nodes receive it through the chat system).
2014-10-24Upstream fix 3James Haley
Propagation of allegiance from teleport beacons to rebels missing; verfied positioning of missing assignment against disassembly.
2014-10-24Upstream fix 2James Haley
Incorrect field being used to retrieve player names during deathmatch for "%s killed %s" msg; changed to match disassembly.
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-10-18Fix dehacked patch loading order.Simon Howard
The order in which we load dehacked patches is important. Change the order so that IWAD dehacked patches are loaded before any others, and so if, for example, we're playing with Freedoom, the Freedoom string replacements can be overridden by those from extra mods we're playing with. As part of this, ditch DEH_Init() and use DEH_ParseCommandLine() instead to handle the -deh option. Remove the DEH_Init() message from startup and show messages about dehacked patches that we load with the WAD files that we load.
2014-09-24Upstream fix to torpedo weapon changingJames Haley
Use of the wrong enum value as an index into weaponinfo left the torpedo's selectability accidentally relying on you having 30 or more rockets instead of cells. Verified against binary as a choco error.
2014-09-19Upstream fixes to stair building issuesJames Haley
First sector moved instantly for buildDown16 stairs due to neglect of using direction instead of constant 1. Also found that Strife clears the tag of the first stair sector.
2014-09-18Upstream bug fix to teleport beacon allegianceJames Haley
Was not propagating properly from player to beacon to rebels due to mistranslated assembly code; access to wrong structure.
2014-09-13Add vld_ prefix for vldoor_e enum values.Simon Howard
It was pointed out to me recently that vldoor_e has enum values named 'open' and 'close'. These can potentially conflict with POSIX standard functions that have the same names, if the right header files are included. This doesn't currently cause any problems. However, to avoid any possibility of a conflict occurring if a different compiler is used, add a vld_ prefix to all the enum values, to namespace them.
2014-08-16Fix finding of voices.wad when -iwad is only hintJames Haley
Somebody broke this by using sizeof() on a malloc'd char *
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-19Exit with error on startup if using the wrong IWAD.Simon Howard
Having multiple binaries can cause some confusion - some users try to run chocolate-doom with hexen.wad, thinking it is supported. Add a startup check that makes sure the user is not trying to start the game using the wrong IWAD file for the binary being run. This fixes #382.
2014-04-19joystick: Add joystick button to toggle menu.Simon Howard
When using a joystick or gamepad it's nice to be able to bring up the menu without having to reach for the keyboard. This makes modern gamepads more useful/usable.
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-31strife: Add missing NULL to M_StringJoin call.Simon Howard
2014-03-31Fix typo in src/strife/p_saveg.cFabian Greffrath
2014-03-30strife: Eliminate use of sprintf().Simon Howard
Use snprintf() in place of sprintf(). This is part of fixing #371.
2014-03-30hexen: Make -playdemo cope with paths.Simon Howard
Vanilla Hexen makes you specify the demo name to play by giving the plain lump name, eg. heretic -playdemo mydemo to load mydemo.lmp. It doesn't work if you specify the extension or the full file path. As a convenience and to match the behavior of Chocolate Doom, allow paths and extensions. Also rework the code for other games so that they're slightly more consistent. This fixes #301.