Build 10332
GIT-
Generale
Duke3D/Editor: Add "whilevare" CON command
Mostra dettagli
Also fix editor checking for "else" tokens on whilevarl.
Nickname SVN e nomi Git sono unificati per persona.
Duke3D/Editor: Add "whilevare" CON command
Also fix editor checking for "else" tokens on whilevarl.
Introduce actor event 'EVENT_PREACTORDAMAGE'
This event is executed when an actor runs A_IncurDamage(), and is placed just before subtracting 'htextra' from 'extra' and updating the actor's owner (i.e. just before damage is applied to the actor). For useractors, this normally occurs when ifhitweapon is called. Set RETURN to a nonzero value to skip applying the damage. This will also cause the 'ifhitweapon' conditional to skip the branch. Note that doing so will not automatically reset htextra to 0.
Print script name and line if gamevar/struct index error occurs
Restore the CON commands 'getmusicpos' and 'setmusicpos'
Fix an error with the bonus tile, and extend EVENT_GETBONUSTILE
Within EVENT_GETBONUSTILE, you can now set ud.return[0] to ud.return[4] to change each frame of the bonus screen animation separately.
Add event EVENT_GETBONUSTILE to change bonus screen pic
The RETURN value will be set to the current base bonusscreen tile, and changing it will change the tiles displayed in the bonusscreen.
Only attempt to switch subweapon if we actually have the weapon
This fixes a bug in World Tour where trying to switch to the flamethrower while the current weapon is the freezer, and you have flamethrower ammo but not the actual weapon itself, then this instead locks the weapon key, preventing you from switching back to the freezer from other weapons. This bug also affected the Shrinker, but only if CON code changes the 'gotweapon 11' value to 0 after the player obtains the weapon.
Reset all actor vars in prelevel() regardless of the sprite's statnum
Previously, only sprites with statnum 0 would have their per-actor variables reset to the default on map load. This meant that sprites with statnums that were pre-defined in the map would inherit the actor var values of the sprites with corresponding spriteNums from the previous map. Additionally, the per-actor var reset is now performed before EVENT_PRELEVEL, meaning that any changes to actorvar that occur in this event will now persist. Previously, altering actor vars for sprites with statnum 0 in this event would not have any effect, as they would be reset to their defaults afterwards.
Add sanity checking to CON decimals, hex constants and labels
* Scripts no longer compile if a hex constant is malformed (e.g. 0x, 0xz) * Compiler will now warn if a decimal or hex constant isn't terminated in a sane manner. (example: digit is followed by letters: "100ab") * Compiler will now warn if a label starts with digits. This is done to prevent ambiguity between integer constants and actual labels.
Add the CON commands `getngcflags` and `setngcflags`
Usage: ``` getngcflags <var> <idx1> [<idx2>...] setngcflags <const/var> <idx1> [<idx2>...] ``` Gets/sets the flags for the newgamechoices entries at the specified indices. The index list is variable-sized, up to a maximum of 3. This can be used to enable/disable the MEF_Hidden and MEF_Locked state. Supersedes the userdef struct members: `m_newgamecustomopen` and `m_newgamecustomsubopen`.
Add events EVENT_PREUPDATEANGLES and EVENT_POSTUPDATEANGLES
These events trigger once every frame and provide access to the input struct value updates of each frame. This makes it possible to alter input.q16avel and input.q16horz again, even with smooth mouse aiming. Addresses terminx/eduke32#132
Improve the CON_ADDLOGVAR command
Changes: - Passing struct members and player vars as argument now works. - If struct members are accessed without specifying the index, the command will display which index was used by the CON VM. - Enable use of constant values for array indexing in addlogvar - Enable logging of integer constants with addlogvar - General refactoring and code improvement.
Expose 8 additional clipboard variables as READONLY to M32 CON
These variables include: * `tempxpanning` * `tempypanning` * `tempxvel` * `tempyvel` * `tempzvel` * `tempstatnum` * `tempblend` * `tempsectnum`
Update g_animPtr before and after cutscene loops
This will allow all CUTSCENE events to use the ifcutscene command. Before, only EVENT_CUTSCENE for ANM files could use it.
Expose newgamecustom menu and submenu index to CON (read-only).
New userdef struct members: ud.m_newgamecustom, ud.m_newgamecustomsub