Commit graph

7321 commits

Author SHA1 Message Date
Christoph Oelckers
2447f7bc38 - renamed FTransform access functions. 2016-04-23 13:40:02 +02:00
Christoph Oelckers
04e614daec - removed some fixed point functions that are no longer needed.
- fixed: Visplane checks should only compare the plane flags that are relevant for rendering and mask out the rest.
- floatified FTransform and made the visplane checks a bit less verbose by moving the comparison as an operator into FTransform.

Note that this operator needs forceinline on Visual Studio so that it won't get called as a function.
2016-04-23 12:42:07 +02:00
Christoph Oelckers
35a6994d0a - remove the 'F' prefix from the floating point access function to the sidedef texture info, now that the fixed point versions are gone. 2016-04-23 10:55:55 +02:00
Christoph Oelckers
be8d1b46a7 - remove the deleted functions, now that they are no longer needed. 2016-04-23 10:51:58 +02:00
Christoph Oelckers
4d4f31fd83 - floatified sidedef texture info and fixed two bugs involving this data. 2016-04-23 09:41:59 +02:00
Randy Heit
f1b3f59bcc Renderer floatification: Use floating point for wall scale and yrepeat 2016-04-22 23:12:53 -05:00
Randy Heit
1f97488945 Renderer floatification: Use floating point for decals 2016-04-22 23:12:53 -05:00
Randy Heit
cb0fe38dfe Renderer floatification: "fix for signed divide" isn't needed when using xs_RoundToInt 2016-04-22 23:12:53 -05:00
Randy Heit
b2b3e50c5c Renderer floatification: Use floating point for geometry Zs 2016-04-22 23:12:53 -05:00
Randy Heit
3ef5a678d5 Renderer floatification: Use floating point for texturemids and Y scales 2016-04-22 23:12:53 -05:00
Randy Heit
4a1cc61822 Renderer floatification: Restore playersprite rendering 2016-04-22 23:12:27 -05:00
Randy Heit
ec8d038c99 Renderer floatification: Use floats for lighting values 2016-04-22 23:10:34 -05:00
Randy Heit
4416d88eb2 Renderer floatification: Use floating point for visibility values 2016-04-22 23:10:02 -05:00
Randy Heit
ded3f92452 Commence renderer floatification 2016-04-22 23:09:13 -05:00
Randy Heit
bab0ed451a No more warnings when building re2c with VC++ 2016-04-22 22:56:47 -05:00
Christoph Oelckers
3c7d0c971f - fixed: It seems it is not allowed to serialize any thinker before the actual thinker chain is serialized. This means that sector_t::floordata, ceilingdata and lightdata's handling had to be moved to P_SerializeWorldActors. 2016-04-22 17:48:25 +02:00
Christoph Oelckers
382a6e8b9f - link actors to touching line portals, for use by the renderer. 2016-04-21 22:59:07 +02:00
Edoardo Prezioso
afa3009f93 - Fixed a GCC/Clang compiler error and a warning. 2016-04-21 16:11:03 +02:00
Edoardo Prezioso
6cfd82f500 - Simplify more, found by code inspection. 2016-04-21 16:03:33 +02:00
Edoardo Prezioso
6aca7604eb - Clean the code by using AActor::GiveInventory.
This fixes also a bug in FraggleScript GiveInventory, which tried to access the 'SaveAmount' member of 'ABasicArmorBonus' with the wrong cast.
2016-04-21 16:02:43 +02:00
Edoardo Prezioso
7b35f32f3d - Added the 'GiveInventory' method to the actor.
This will help cleaning up the item giving code. Returns a bool, in case the pickup failure might turn to be interesting in the future.
2016-04-21 15:59:23 +02:00
Christoph Oelckers
ed070cfe06 - updated xlat/eternity.txt. 2016-04-21 13:01:57 +02:00
Edoardo Prezioso
ad9b9479ec - Fixed erroneous P_UndoPlayerMorph calls.
In some places, P_UndoPlayerMorph was called with the 'force' argument placed in the 'unmorphflag' parameter, so that 'forced' unmorphs would be not completely forceful.

I hope no mod relied on this weirdness...
2016-04-21 11:25:08 +02:00
Christoph Oelckers
27cc3d6289 - fixed: ACS's GetActorLightLevel didn't check 3D floors. 2016-04-21 11:17:28 +02:00
Christoph Oelckers
ba7260c176 - fixed overflow issue with large damage values in P_RadiusAttack. 2016-04-21 10:51:41 +02:00
Christoph Oelckers
c3eec6db4d -fixed warnings 2016-04-21 10:38:42 +02:00
Randy Heit
074bce643a Fixed: A_SetAngle had accidentally had the "action" specifier removed 2016-04-20 20:03:05 -05:00
Christoph Oelckers
e5dc92f998 - some reshuffling of save data so that the actors won't get restored before the sectors.
Note that this required splitting P_SerializeWorld, because sector_t and FSectorPortal contain some actor pointers, for which the same rule applies: Portal linking can only be done after all sectors have been read, meaning it cannot be done along with the rest of the data in these structures.

Obviously such a change breaks savegame compatibility so the min. savegame version had to be increased again.
2016-04-20 19:42:00 +02:00
Christoph Oelckers
082042818b - refactored sector portal data so that it does not rely on actors.
This is necessary because otherwise the level data cannot be serialized before the actors.
2016-04-20 19:20:11 +02:00
Christoph Oelckers
3532dd9ea1 - fixed coordinate correctness issues with P_CheckFor3DFloor/CeilingHit. 2016-04-20 13:28:19 +02:00
Randy Heit
60966f472f Revert "Revert "Remove "action" from Actor functions that don't actually need it""
- This reverts commit 06216d733e.
- I don't know what I was thinking. Since stateowner is always available
  to the wrapper function, and this code is only generated for the wrapper
  function, it's a nonissue. The state is already located before calling
  any function that uses it.
2016-04-19 21:09:15 -05:00
Randy Heit
06216d733e Revert "Remove "action" from Actor functions that don't actually need it"
- This reverts commit 39df62b20e.
- Anything that needs to lookup a state also needs stateowner. See
  FxMultiNameState::Emit(). I will need to be more selective when
  de-actionifying functions.
2016-04-19 20:56:43 -05:00
Randy Heit
05843d3b13 Use "%#g" when disassembly floating point constants
- With "%g", there would be no decimal point if the number had no
  fractional part, making the output indistinguishable from integers.
2016-04-19 20:48:12 -05:00
Randy Heit
5d3e413d42 Make A_Stop an action function again
- A_Stop takes no parameters, so it should be an action function to avoid
  creating the wrapper when called.
2016-04-19 20:46:30 -05:00
Randy Heit
39df62b20e Remove "action" from Actor functions that don't actually need it
- An actor function really only needs to be an action function if:
  1. It can be called with no parameters specified, either because it takes
     none or because all its parameters are optional. This lets SetState()
     call it directly without creating a wrapper function for it.
  2. It wants access to the callingstate or stateowner parameters. Most
     functions don't care about them, so passing them is superfluous.
2016-04-19 20:28:49 -05:00
Christoph Oelckers
322b9fc0ae - wrap access to portal properties into sector_t:: member functions. 2016-04-19 11:35:28 +02:00
Randy Heit
c795f29cc4 Reduce calling overhead for A_SetUser* functions by making them non-action functions 2016-04-18 23:18:34 -05:00
Randy Heit
e83bc53678 Add atan2, which was conspicuously absent, to the VM
- DECORATE now has atan2(y,x) and VectorAngle(x,y) functions. They are
  identical except for the order of their parameters. The returned angle
  is in degrees (not radians).
2016-04-18 23:06:17 -05:00
Christoph Oelckers
30a530b178 - fixed: TAG_BLASTERP was on the wrong actor. 2016-04-19 02:06:36 +02:00
Christoph Oelckers
e48c4d3e44 - added tag strings for Heretic's powered weapon versions. 2016-04-19 01:00:09 +02:00
Christoph Oelckers
69cbb7a382 - fixed: The pitch calculation did not check the calling actor's height when retrieving the position to calculate the pitch from. 2016-04-19 00:52:08 +02:00
Christoph Oelckers
d2735d7632 - fixed: Trace considered any water surface a hit if nothing else was found. 2016-04-18 18:31:19 +02:00
Christoph Oelckers
5e822fd60b - fixed: The starting position of sight checks was inconsistent in different parts of p_sight.cpp. 2016-04-18 16:46:56 +02:00
Edoardo Prezioso
8dee0be9ab - Fixed the morphed player actor friendliness.
It wasn't inherited from the original player actor object.
2016-04-18 16:30:13 +02:00
nashmuhandes
a30eb4d709 Fixed a potential NULL assignment in FOptionMenuItemSafeCommand::Activate 2016-04-18 16:30:13 +02:00
nashmuhandes
6bfdd10a5c Show the command label when choosing a SafeCommand (like Reset2Defaults) in the menu. 2016-04-18 16:30:12 +02:00
Christoph Oelckers
2327107f32 - fixed: Actors cannot be linked into the world until after all actors and sectors have been deserialized.
Two issues:

Portal linking requires all skyboxes in the sectors to be present, without them some info is not there when needed.
UpdateWaterLevel was called in AActor::Serialize, which operated on the freshly loaded level where lots of things haven't been set up yet and plane heights may be wrong.
2016-04-18 15:27:19 +02:00
Christoph Oelckers
961a4c8524 - optimized sector portal checks.
All the PortalBlocks* functions were turned into real function calls which for such a frequent check should be avoided. So now any linked portal sets a flag in the attached sectors so that it isn't necessary to check the skybox pointer each time which makes the functions subject to inlining again.
2016-04-18 13:40:09 +02:00
Christoph Oelckers
42e88ef120 - removed sector_t::FloorDisplacement and CeilingDisplacement.
Using the values these return directly is just as much code.
2016-04-18 13:40:09 +02:00
Christoph Oelckers
c30d5d42a2 - fixed: UpdateSectorRenderList may not be called when spawning mapthings.
At this time the portals have not been initialized yet and doing this here would trash the cached previous coordinate.
2016-04-18 13:40:08 +02:00