Commit graph

152 commits

Author SHA1 Message Date
Christoph Oelckers
d941dea005 - added a level iterator for operations that need to make changes to all open levels.
Since currently there is only one level, this will obvciously only run once on that level for the time being.

This is mainly used for CCMDs and CVARs which either print some diagnostics or change some user-settable configuration.
2019-01-28 02:41:29 +01:00
Christoph Oelckers
64e9f7e43b - changemap must use the current UI level if the user wants to go to "*". 2019-01-28 02:08:49 +01:00
Christoph Oelckers
b4acb857ad - the final batch of easy level replacements.
What's left will require a bit more work...
2019-01-27 21:59:19 +01:00
Christoph Oelckers
22939aade7 Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/c_dispatch.cpp
2019-01-27 10:26:23 +01:00
Rachael Alexanderson
1407d0a7c5 - add 'cl_blockcheats' - useful for people who use debugging keys, allows a user to consciously turn off cheats without affecting the server 2019-01-24 22:09:09 -05:00
Christoph Oelckers
4c250a58ca - reroute all uses of FActorIterator and NActorIterator through FLevelLocals. 2019-01-24 18:50:22 +01:00
Christoph Oelckers
9fedecbe60 Renamed FTextureManager::GetTexture to GetTextureID
It doesn't return a texture after all and I want to repurpose the name for something else.
2018-12-07 02:31:30 +01:00
Christoph Oelckers
bfcd714186 - started replacing direct references to class AInventory.
The easiest part was the type checks which could be changed to the name variant with a global search and replace.
2018-12-02 21:35:55 +01:00
Christoph Oelckers
319f8743db - consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
2018-12-02 16:53:12 +01:00
Christoph Oelckers
98b8a2b1f4 - missed one place where FBrokenLines was used. 2018-10-31 20:36:23 +01:00
Christoph Oelckers
0d54d335c4 - use a saner data structure to store the BrokenLines.
Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements
2018-10-31 19:13:54 +01:00
alexey.lysiuk
2ae8d39441 Removed all superfluous #include's
Automatically optimized by CLion IDE with manual corrections
2018-04-24 14:30:35 +03:00
Christoph Oelckers
e89a598b31 - renamed FTexture's UseType flags and gave them a dedicated type.
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
2018-03-25 20:26:16 +02:00
Christoph Oelckers
5fa63c396d - sound code and most of texture code converted to FileRdr.
This allowed to remove a lot of bad pointer voodoo in the music loader, because the new class does not allow duplication of the reader object
2018-03-10 18:45:11 +01:00
alexey.lysiuk
c7eea9b480 Marked a few more CCMDs as unsafe 2018-01-29 13:30:36 +02:00
Christoph Oelckers
2720e36a2c - marked a few more CCMDs unsafe. 2018-01-20 09:11:28 +01:00
alexey.lysiuk
f25a5ea2bc Marked a few commands as unsafe
This process of finding unsafe commands is not complete!
2018-01-07 15:03:49 +02:00
Rachael Alexanderson
3031d48bfb - added TID to actorlist and similar commands output 2017-09-28 11:34:01 -04:00
Rachael Alexanderson
1bfc2faa49 - added 'r_showcaps' command which serves as a documentation for available flags and shows what flags are in use by the current rendering settings 2017-07-29 17:03:43 -04:00
Christoph Oelckers
ec1aeaf384 - allow changing to the current map by using "*" as argument. Implemented for 'map', 'changemap' and 'recordmap'. 2017-04-28 11:39:47 +02:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
f70d0a6ced - added a setinv cheat CCMD. 2017-03-14 11:44:21 +01:00
nashmuhandes
bb1709228c Changed FOV from a CCMD to a CVar, allowing players' FOV settings to persist. Also exported SetFOV to PlayerInfo for ZScript. 2017-02-28 14:46:30 +01:00
Christoph Oelckers
a0b830c198 - allow all actor list CCMDs to filter by tid. 2017-02-26 15:20:43 +01:00
Christoph Oelckers
43e5f035e4 - added a 'brief' mode to linetarget and info. 2017-02-25 21:48:15 +01:00
Christoph Oelckers
a6785afddb - optimized the FName versions of IsDescendantOf and IsKindOf. These can be done without first looking up the class type itself. 2017-02-08 15:47:22 +01:00
Christoph Oelckers
6d28aa3541 - do not use strtol for parsing critical values that can get large.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
2017-02-01 11:19:55 +01:00
Christoph Oelckers
a2a1d214c0 - extended give and take cheat's arguments to full integers. 2017-01-29 11:45:28 +01:00
Christoph Oelckers
cd7986b1b1 - refactored global sides array to be more VM friendly.
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers
c02281a439 - refactored the global sectors array into a more VM friendly type and moved it into FLevelLocals. 2017-01-07 19:32:24 +01:00
Rachael Alexanderson
cab1b60ffc - Some cleanups for c_cmds.cpp, exported some functions as well as functions used for "print/targetinv" to their own file. 2016-12-29 01:30:54 +01:00
Rachael Alexanderson
5e171824ac - "myinfo" - executes info on oneself
- "targetinv" - executes "printinv" at current crosshair target
2016-12-12 15:22:56 +01:00
Edoardo Prezioso
0cff443945 - Fixed missing linebreak in 'currentpos' error message. 2016-12-04 10:25:23 +01:00
Christoph Oelckers
810ef8f775 - save global savegame data to JSON as well.
This is incomplete and untested, just a safety commit before going on.
2016-09-21 12:19:13 +02:00
raa-eruanna
476b727d5d "actorlist" and "actornum" no longer return already-owned inventory objects 2016-09-16 00:47:56 -04:00
raa-eruanna
ac70f77e44 Added the following ccmds:
actorlist, actornum, monsternum, itemsnum, countitemsnum
Modified the following ccmds:
 monster, items, countitems

All commands with "num" at the end simply print a count of their respective filters, all other listed commands now print a list and a count.
2016-09-15 15:09:36 -04:00
Edoardo Prezioso
28ac65b25b - Fixed GCC and Clang compilation errors. 2016-04-02 23:01:32 +02:00
Christoph Oelckers
66929cbaff - floatified p_trace, p_slopes and p_udmf.cpp.
- major cleanup of unused code.
2016-03-30 16:30:22 +02:00
Christoph Oelckers
fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers
8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +01:00
Christoph Oelckers
0bdb65c477 - made AActor::radius a double.
This means that all files in g_doom are now fully converted.
2016-03-20 15:04:13 +01:00
Christoph Oelckers
51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00
Christoph Oelckers
f332a098cd - reworked calls to P_SpawnPlayerMissile, P_AimLineAttack and P_LineAttack to use floating point angles. 2016-03-18 00:43:05 +01:00
Christoph Oelckers
671291227e - first stage of converting actor angles to float complete
Patched up everything so that it compiles without errors again. This only addresses code related to some compile error. A large portion of the angle code still uses angle_t and converts back and forth.
2016-03-16 12:41:26 +01:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers
b4a002a07f - preparations for allowing hitscans through portals.
To allow processing the hit through an arbitrary portal without reference to the portal group table, P_AimLineAttack and P_LineAttack need to pass some more info than just the linetarget.
We need the relative positions of shooter and target within the visual reference of the other to calculate proper angles and we need to know if such a portal was crossed at all, because a few things, e.g. seeker missiles won't work with them.

- fixed setup of target acquisition for the Mage Staff.

The pre-acquired seeker target was never passed to the spawned projectiles.
2016-03-01 16:39:31 +01:00
Edoardo Prezioso
166687d971 - Added optional 'z' parameter to the 'warp' CCMD.
Now it's possible to warp above 3dfloors.
2016-02-20 13:32:27 +01:00
Christoph Oelckers
6adb069506 - rewrote p_local.h so that it doesn't pull in the entire bunch of headers.
This was to resolve some circular dependencies with the portal code.
The most notable changees:

 * FTextureID was moved from textures.h to doomtype.h because it is frequently needed in files that don't want to do anything with actual textures.
 * split off the parts from p_maputl into a separate header.
 * consolidated all blockmap related data into p_blockmap.h
 * split off the polyobject parts into po_man.h
2016-02-15 02:14:34 +01:00
Christoph Oelckers
158caf78a0 - more float to double conversion.
In particular this removes all assignments of FIXED2FLOAT to double variables because they not only lose precision but also generate unnecessary code.
2016-02-11 21:33:30 +01:00
Christoph Oelckers
4d2a52418f - added an errorlog option.
This cuts down on as much message noise as possible, outputs everything to a file specified as a parameter and then quits immediately, allowing this to run from a batch that's supposed to check a larger list of files for errors.
Multiple outputs get appended if the file already exists.
2016-02-09 14:20:49 +01:00