This works similar to MAPINFO: The first definition in a file declares the format, all later ones must be the same.
This change in syntax increases robustness significantly because it avoids the problems with the original syntax not being able to detect badly formatted names.
Changed SendConsoleEvent to SendInterfaceEvent to make functionality clearer. Added InterfaceProcess virtual to EventHandlers. Added CCMD for sending interface events.
This is mainly for new games which have been designed for hardware rendering.
Note that this does not remove the software renderer's code - all it does is to disable the vid_rendermode CVAR by turning it into a static constant with the value 4.
* deleting some unused code
* turned several class methods into static local functions in cases where they never were used outside this file.
* inlined the dangerous assignment operator in the only place where it was used.
There was one special case allowing to let an actor die on spawn, but this could call script code on an incompletely set up map which resulted in crashes.
- Removed bone manipulation code
- Implemented an index in calculateBones to optimize multi-armature actors
- Moved the bone storage object's creation to RenderModels so that the armature array can be sized there
- Implemented Animation parameters for A_ChangeModel
- Made a modeldef flag to treat additional model indices as just attachments, meaning they will use armature data from index 0
- Fixed an issue with A_ChangeModel where generated indices lower than smf frame amounts could not actually generate anything
Due to undefined downconversion rules from double to int, there is no way to safely downcast the return from MSTimef, meaning the function is completely useless for retrieving integral time stamps.
The old version is essential for these cases and must be kept around.
* Emit a warning when relational comparisons are made between signed and unsigned ints.
* Handle shift operators so that they do not fail for constant definitions.
* changed return type of Array::Size() to signed int as most code out there is using it this way and would otherwise drown in warnings.
* fixed a few deprecation warnings.
- To really take advantage of this function, I thought it would be useful to be able to add additional models if the user wants to. Let's say you got a player model at index 0. Your gun model has the same frames, but you don't want to duplicate the modeldef data. With generator index, you don't need to duplicate the data, just tell generator index to clone frame data from index 0.
- Implemented a little something to check if a negative skin or model index were passed, and prevent modders from pulling that off.
- Made it so when rendering a model, it clones an smf to use so that data isn't overwritten
- Reimplemented the skin index property. This changes the behavior of this index if CMDL_USESURFACESKIN is activated
- Let's fill the holes of serialized data so it can properly be removed instead of leaving undefined behavior behind.
- Added CMDL_HIDEMODEL flag. This makes a model index invisible.
- Made the 2 TArrays into a class called DActorModelData.
- Removed the skinindex and now just uses one index
- Replaced a bunch of nullptr for modelDef checking with NAME_None
- Added some garbage cleanup to A_ChangeModel itself, as well as removing memory of modelData that is no longer needed
- Attempted serialize code, putting up for review
-Added A_ChangeModelDef
A_ChangeModel(modeldef, modelpath, model, modelindex, skinpath, skin, skinid, flags)
This can change the modeldef, model and skins of an actor.
Currently, modelindex and skinindex accept indices from 0-15.
An actor MUST have a modeldef in order to use this function, either defined from modeldef, or given one through the modeldef parameter. You can pass "" to use the same modeldef. Likewise, passing "" for model or skin will just revert to the default model.
Available flags:
CMDL_WEAPONTOPLAYER - If used on a weapon, this instead change's the model on the player instead.
One issue I am aware of right now is that clearing a model by "" sort of works but is buggy. For now you can just manually set the model back using the names explicitly. However, I am stumped and I think getting more eyes on it would help.