Commit Graph

370 Commits

Author SHA1 Message Date
Major Cooke dfa4f38c8f Updated to new save game code. 2016-09-24 09:17:18 +02:00
Christoph Oelckers af6404f763 - all DObjects converted.
- cleaned out some old cruft that's no longer needed.
2016-09-20 10:27:53 +02:00
Christoph Oelckers 7edf4c1afc - added new serializers to several classes and moved the old ones to the dump file. 2016-09-19 12:53:42 +02:00
Christoph Oelckers d24aa5dec9 - reformatting for easier search. 2016-09-19 10:47:59 +02:00
Christoph Oelckers c665cc53f9 - moved new code to its proper location and started moving the replaced old archive code to a placeholder file for easy removal later. 2016-09-19 10:34:54 +02:00
Christoph Oelckers 65c6388d44 Merge branch 'master' into json 2016-09-19 03:54:36 +02:00
Christoph Oelckers f1ba19073f - split Damage into two variables: DamageVal for the old constant and DamageFunc for the DECORATE function.
The way this was done was a major headache inducer, requiring reconstruction of the function each time the value was changed and in general made actor damage a major hassle.
There was a DECORATE wrapper to mimic the original behavior but this looked quite broken because it completely ignored the different semantics of both damage calculation types.
It also made it impossible to determine if damage was a function or a value.
This accessor has been reverted to what it should be, only returning the constant, which now is -1 for a damage function. I am sorry if this may break the odd mod out but a quick look over some DECORATE-heavy stuff showed that this was never combined in any of them so that accessing 'damage' in DECORATE code depended on an actual damage function.

To get proper damage, a future commit will add a DECORATE function which calls AActor::GetMissileDamage.
2016-09-19 03:36:51 +02:00
Christoph Oelckers 9313a99e12 - started implementing a JSON based serializer. Unfortunately it is far too slow to be of any real use. 2016-09-18 13:26:34 +02:00
Major Cooke ce13b5c6e1 Enhanced FastProjectile trails.
- Trails now copy pitch, and set the projectile as the target.
- Added GETOWNER flag. Using it sets the owner of the fast projectile as the target instead, if it has an owner.
2016-09-08 00:38:11 +02:00
Major Cooke c4357bd352 Tracer pointer is no longer a safe candidate for storing player morph pointers. Instead, actors must have a new, non-manipulatable pointer. This fixes the following circumstances:
- Crashes occurred if a particular actor was a tracer to the player and the actor was not gone by the time the player unmorphs.
- Failed unmorphs occur if tracer was manipulated through means like A_RearrangePointers, etc.
2016-09-01 13:49:58 -05:00
Major Cooke dfed6ac1fb Added SpriteAngle and SpriteRotation properties.
- Includes four functions, A_SetSprite(Angle/Rotation) and GetSprite(Angle/Rotation).
- SpriteRotation offsets the angle of the sprite, allowing for actors to move backwards or sideways for example.
- SpriteAngle requires +SPRITEANGLE and sets the actor's sprite to the absolute rotation found at that angle. Overrides SpriteRotation once the flag is on.
2016-07-30 00:26:40 +02:00
Jordon Moss c0eb8f3b96 Added KILL Script type and associated flags and GameInfo keyword.
This is different from the original "Death Scripts" idea. This tackles
some issues I've found with the original idea (now you can have as many
scripts as you want, not just global and actor-defined). Also takes care
of other complaints about the original idea and push request. Flags and
their use are in code comments.
2016-07-28 08:34:23 +02:00
MajorCooke 7ded355d5d Added rollcenter compatibility. 2016-07-13 09:29:36 +02:00
Christoph Oelckers 0b93e9b897 Merge branch 'roll' of https://github.com/MajorCooke/zdoom 2016-07-04 00:43:16 +02:00
Leonard2 abc7113e09 Removed the INSTATECALL flag because it is now unused and was replaced by stateinfo 2016-06-17 18:36:57 +02:00
MajorCooke 53837de17d Added DONTFLIP flag.
- By default, when viewing a flat sprite from behind, the image is flipped around on the X axis. This may not always be desired, so this flag disables it.
2016-06-05 15:21:19 -05:00
MajorCooke def785e462 Removed PITCHFLATSPRITE. FLATSPRITE now encompasses its behavior. 2016-05-02 06:32:33 -05:00
MajorCooke 0bf7c3e362 - Removed FlatAngle. This will come back hopefully in another commit sometime in the future. 2016-05-01 17:19:39 -05:00
MajorCooke a8248433e9 - Updated <pitch>/flat/roll/wall sprites submission to 2.9+. (ZDoom compatibility submission. )
- FLATSPRITE: An actor becomes flat as if they were a decal on the floor.
- PITCHFLATSPRITE: A flat sprite tilts up and down based on pitch.
- WALLSPRITE: Similar to a Y billboarded sprite. The degree of the flattening is determined by the FlatAngle property.
- ROLLSPRITE: The sprite of the actor is affected by the Roll property.
2016-05-01 08:45:50 -05:00
Christoph Oelckers ef98757c7c - replaced finesine for texture warping with a smaller custom table, based on the old 2005 FP code, but fixes the generation of the sine table.
- removed all remnants of finesine and deleted tables.c and tables.h.
2016-04-28 15:59:37 +02:00
MajorCooke 660aff562d - Added support for THRU flags on bullets and rails.
- ALLOWTHRUFLAGS must be used on the puffs, added for the sake of compatibility with older mods. This applies to the following:
-- Bullets: THRUACTORS, THRUSPECIES
-- Rails: Same as bullets, but includes THRUGHOST.
2016-04-27 13:38:27 +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 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 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 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 54d78df267 - added a new sector list to AActor that collects all portal-linked sectors the actor's center is in. (Inspired by Eternity's solution to the same problem.)
This is for rendering the sprite properly in all areas the actor touches. The original thinglist is not sufficient for this and Boom's touching thinglist has other purposes and collects too much data.
This new list will only get filled in when the actor is actually crossing a portal plane, for the normal sector thinglist will still be used.
This piggybacks on the msecnode_t code which has been extended to be able to handle more than one list by passing the sector's membert pointers as parameters.
2016-04-17 23:48:04 +02:00
Christoph Oelckers 3f0ed5d252 - added a distancecheck property to AActor that allows a given CVAR to be used as maximum display distance for actors of this type.
This is for WolfenDoom: BOA, which has some scripted sprite distance checks that very negatively affected performance.
2016-04-12 19:44:12 +02:00
Christoph Oelckers 9a07f81269 - renamed all ZatPoint variants that return a fixed point value to ZatPointFixed, to avoid accidental mixup with the floating point variants. 2016-04-02 20:45:32 +02:00
Christoph Oelckers 3db90ff4c1 - removed all remaining fixed point methods from AActor.
- removed all calls to fixed point vertex access methods in p_setup.cpp.

# Conflicts:
#	src/p_setup.cpp
2016-04-02 20:14:58 +02:00
Christoph Oelckers a93296be80 - removed most of the deleted function declarations. 2016-03-31 21:20:45 +02:00
Christoph Oelckers 6445615b5d - fixed the sound location calculations which got somewhat broken by the constant changes during the conversion. 2016-03-31 21:13:32 +02:00
Christoph Oelckers 9412ce45d6 - floatified portals.cpp and most of p_maputl.cpp. 2016-03-31 16:52:25 +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 c2e2910399 - fixed copy/paste error in P_GetFriction resulting in incorrect calculation of movefactor. 2016-03-30 10:08:06 +02:00
Christoph Oelckers 05504b65d2 - floatified p_scroll.cpp
While testing this it became clear that with the higher precision of doubles it has to be avoided at all costs to compare an actor's z position with a value retrieved from ZatPoint to check if it is standing on a floor. There can be some minor variations, depending on what was done with this value. Added isAbove, isBelow and isAtZ checking methods to AActor which properly deal with the problem.
2016-03-28 21:04:46 +02:00
Christoph Oelckers 2fff7005ad - floatified more of p_mobj.cpp 2016-03-28 10:01:24 +02:00
Christoph Oelckers 0baaa3cf63 - floatified P_LineAttack, P_TraceBleed and P_UseLines. 2016-03-27 20:58:01 +02:00
Christoph Oelckers c2e7858e05 - looks like the oldz parameter in UpdateWaterLevel is not needed at all... 2016-03-26 01:13:36 +01:00
Christoph Oelckers e42b0171b3 - floatification of bot code. 2016-03-26 00:34:56 +01:00
Christoph Oelckers 8e13d13916 - floatified the automap. 2016-03-25 21:54:59 +01:00
Christoph Oelckers fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers 2cf3b20ea8 - floatified the last remaining AActor member variable 'damagemultiply'. 2016-03-25 16:30:31 +01:00
Christoph Oelckers 1125101b37 - floatified AActor::Prev plus the stuff using it.
- rewrote some coordinate functions in AActor to use real float math instead of converting back and forth between float and fixed.
2016-03-25 16:25:25 +01:00
Christoph Oelckers 8cdfbeea01 - made AActor::__pos a genuine float vatiable. 2016-03-25 15:43:20 +01:00
Christoph Oelckers 3a598d672e - removed the angle_t type from the VM, now that nothing in the interface requires it anymore. 2016-03-25 14:55:01 +01:00
Christoph Oelckers 8b6b5e7b1c - preparation for upcoming work: rename the fixed point versions of PosRelative. 2016-03-25 14:18:50 +01:00
Christoph Oelckers 7a26318bf0 - floatified friction. 2016-03-24 22:50:03 +01:00
Christoph Oelckers 6c9e5b03c8 - floatified meleerange, pushfactor and radiusdamagefactor, 2016-03-24 21:31:04 +01:00
Christoph Oelckers e077510773 - floatified MaxTargetRange and MeleeThreshold. 2016-03-24 20:56:59 +01:00
Christoph Oelckers c66ff5939d - floatified AActor::bouncefactor and wallbouncefactor. 2016-03-24 20:43:35 +01:00