Commit graph

185 commits

Author SHA1 Message Date
Christoph Oelckers
17a2666bd4 - moved DisplayName, the last remaining PlayerPawn meta property, to PClassActor so that PClassPlayerPawn could be removed.
Now all actors have the same metaclass and therefore it will always be the same size which will finally allow some needed changes to the type system which couldn't be done because it was occasionally necessary to replace tentatively created classes due to size mismatches.
2017-02-08 19:42:24 +01:00
Christoph Oelckers
68e9918ed5 - moved player color sets and pain flashes into global variables.
There's simply never enough of them and they are used far too infrequently to justify the hassle of tagging along two TMaps per class.
For what they provide, single global lists that handle all player classes at once are fully sufficient.
2017-02-08 19:10:11 +01:00
Christoph Oelckers
c77f6636f8 - moved the three remaining variables from PClassInventory to PClassActor so that PClassInventory can be removed. 2017-02-08 18:11:23 +01:00
Christoph Oelckers
2ca0e34785 - turned many of PClassPlayerPawn's strings into names and moved all scalar properties into APlayerPawn.
The goal is to get rid of PClassPlayerPawn and PClassInventory so that the old assumption that all actor class descriptors have the same size can be restored
This is important to remove some code that seriously blocks optimization of the type table because that can only be done if types do not need to be replaced.
2017-02-08 16:42:13 +01:00
Christoph Oelckers
17ed23bfcc - don't read the full height of a player from the defaults, because that cannot be changed by A_SetHeight.
Instead a new member, FullHeight is used for this now.
2017-01-24 00:12:06 +01:00
Christoph Oelckers
2dd6fb9595 - scriptified BasicArmorBonus. 2017-01-18 20:23:13 +01:00
Christoph Oelckers
cfdd580044 - deleted a_artifacts files. 2017-01-18 10:44:51 +01:00
Christoph Oelckers
23482735a0 - removed PClassAmmo.
No need to maintain these clunky meta class for one single property. The overhead the mere existence of this class creates is far more than 100 spawned ammo items would cost.
There is no need to serialize AAmmo::DropAmount, this value has no meaning on an already spawned item.
2017-01-12 11:44:33 +01:00
Christoph Oelckers
87484950cf - removed an assert from APowerMorph::EndEffect. With some recent changes to DestroyAllInventory it appears that the asserted condition no longer is true at this point when ending a game.
- fixed: When replacing a tentative class, the pointers in the morph objects were not replaced. Instead of adding more ReplaceClassRef methods I chose to integrate this part into the PointerSubstitution mechanism and delete ReplaceClassRef entirely. The code had some oversights anyway that would have caused problems, now that non-actors can be created.
2016-12-01 00:05:23 +01:00
Christoph Oelckers
229c55ce61 - moved ammo to its own file, including the backpack.
- moved weapon declarations to their own header.
2016-11-30 12:24:50 +01:00
Christoph Oelckers
bbf62132d8 - added a larger batch of function exports.
- cleaned up the virtual function interface of APlayerPawn which still had many virtual declarations from old times when class properties were handled through virtual overrides. None of this makes sense these days anymore.
2016-11-30 01:25:51 +01:00
Christoph Oelckers
3af9232fca - scriptified a_strifeitems.cpp and a_debris.cpp.
- Changed the glass shards so that they do not have to override FloorBounceMissile. It was the only place where this was virtually overridden and provided little usefulness.
- made 'out' variables work.
- fixed virtual call handling for HandlePickup.
2016-11-29 12:17:05 +01:00
Christoph Oelckers
66d28a24b8 - disabled the scripted virtual function module after finding out that it only works if each single class that may serve as a parent for scripting is explicitly declared.
Needless to say, this is simply too volatile and would require constant active maintenance, not to mention a huge amount of work up front to get going.
It also hid a nasty problem with the Destroy method. Due to the way the garbage collector works, Destroy cannot be exposed to scripts as-is. It may be called from scripts but it may not be overridden from scripts because the garbage collector can call this function after all data needed for calling a scripted override has already been destroyed because if that data is also being collected there is no guarantee that proper order of destruction is observed. So for now Destroy is just a normal native method to scripted classes
2016-11-25 00:25:26 +01:00
Christoph Oelckers
099b9970ef - added proper definitions for all exported native fields.
- synthesize native fields for all declared flags, not just for AActor.
2016-11-22 23:43:32 +01:00
Christoph Oelckers
bbb0778fd4 - scriptified Chicken and Pig - not tested yet, because other things have priority. 2016-11-22 12:21:55 +01:00
Christoph Oelckers
3ce699bf9b - implemented pass-by-reference arguments - so far only for memory based variables.
- changed Dehacked weapon function lookup to check the symbol table instead of directly referencing the VM functions. Once scriptified these pointers will no longer be available.
- removed all special ATAGs from the VM. While well intentioned any pointer tagged with them is basically unusable because it'd trigger asserts all over the place.
- scriptified A_Punch for testing pass-by-reference parameters and stack variables.
2016-11-19 01:23:56 +01:00
raa-eruanna
e0efdd97b3 - Added: PlayerPawn property "Player.ViewBob" which acts as a MoveBob/StillBob multiplier. 2016-10-21 19:24:39 +02:00
Christoph Oelckers
f0e8e860f1 Merge branch 'master' into json 2016-09-22 09:09:48 +02:00
raa-eruanna
bc0624e3b2 Fixed my error where I was using a local session variable rather than the proper user info for the weapon bob speed. 2016-09-22 08:42:59 +02:00
raa-eruanna
780d672b25 Adds user-definable weapon bob speed 2016-09-22 08:42:59 +02:00
Christoph Oelckers
da83d9e2bd - converted player serializer and everything it needs.
This means that everything belonging to the level snapshot will be generated in the JSON output.
2016-09-21 01:18:29 +02:00
Christoph Oelckers
e89d072abc - most thinkers are done. Some stuff about polyobject pointers is temporarily disabled right now because some of the required functions have already been pulled out. 2016-09-19 19:14:30 +02:00
Christoph Oelckers
88eab9d1f9 - And another batch of serializers. 2016-09-19 15:07:53 +02:00
Christoph Oelckers
d24aa5dec9 - reformatting for easier search. 2016-09-19 10:47:59 +02:00
Leonard2
5c182c7fd7 Fixed a crash with heretic's ChickenPlayer class 2016-07-13 13:01:32 +02:00
Leonard2
2f5ae3b51e Changed the default layer indices and renamed them
Note that this doesn't compile yet
2016-05-28 01:19:41 +02:00
Leonard2
8f360f3bea Small refactor 2016-05-27 23:37:35 +02:00
Christoph Oelckers
d767d10322 - made PSprites submission GC aware. 2016-05-21 13:11:43 +02:00
Leonard2
8c205ebac3 Added A_OverlayOffset
Like A_WeaponOffset except it can access any psprites
2016-05-20 17:04:45 +02:00
Leonard2
1966b61b8f Generalized the psprites implementation 2016-05-20 17:04:44 +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
4d22b346f4 - floatified the remaining fixed point variables accessible through DECORATE. PROP_FIXED_PARAM is no longer used anywhere. 2016-03-24 23:50:29 +01:00
Christoph Oelckers
6b3c0ecbd3 - floatified viewheight variables and some related code. 2016-03-22 18:06:08 +01:00
Christoph Oelckers
af427b80bd - did some cleanup and consolidation on damage factor code while converting it all to floating point.
- made armor properties floating point.
2016-03-22 16:35:41 +01:00
Christoph Oelckers
a652c061f6 - converted g_strife to full floating point use, except the floor height changing stuff in A_LightGoesOut. 2016-03-22 12:42:27 +01:00
Christoph Oelckers
4155e84a1c - made player_t::crouchoffset and FPlayerStart's coordinates doubles and added a float version of divline_t so that I could complete the conversion of Hexen's game code.
- consolidated the actor based damage factor code which was repeated multiple times in various damage inflicting functions.
2016-03-22 00:06:58 +01:00
Christoph Oelckers
ada5097e34 - converted scale variables in AActor, FMapThing and skin to float. 2016-03-20 12:13:00 +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
Christoph Oelckers
651817fad7 - made AActor::velx/y/z and player_t::velx/y fixedvec's.
(This commit is 95% search & replace with only a few places where velz was used as a local variable changed.)
2016-03-12 14:11:43 +01:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers
6ce0c9f78e - split up PClass::Derive and its child functions because part of them is also needed when initializing an inherited native class with the properties of its parent - but calling the base version in PClass is not possible.
- moved a few AActor properties out of the EXE so that I could easily test if it works.
2016-02-10 00:17:00 +01:00
Christoph Oelckers
b484cbf18a - fixed: It is not guaranteed that the class object that is created by FindClassTentative actually matches the real object that is required later, so it needs to be replaced wherever it could be referenced once the real object is created.
- removed some unneeded code from earlier attempts to fix the class type resolving issue.
2016-02-09 23:08:51 +01:00
Randy Heit
b3b0886b64 Merge branch 'scripting'
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-02-04 15:17:22 -06:00
Christoph Oelckers
8068fca601 - fixed: player_t::Uncrouch should only reset the view height if the player is actually crouched. 2016-01-31 22:36:37 +01:00
Christoph Oelckers
0ddf9db8dd - fixed: Uncrouching a player also needs to reset the viewheight to its default. 2016-01-30 12:51:15 +01:00
Christoph Oelckers
bf747075e8 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_hexen/a_clericstaff.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-17 20:57:55 +01:00
Christoph Oelckers
cfcd2668cc Merge commit '772a5724313f2ad0bd6828fcc28545a9ee5e6068' into scripting
Conflicts:
	src/p_pspr.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-17 20:00:45 +01:00
Christoph Oelckers
154e106315 - make better use of the damageinterval value for Strife's delayed damage. 2016-01-06 14:16:42 +01:00