Build 5357
SVN-
Add "defstate" token which functions identically as in M32script: synonymous with CON's "state" only at top-level (when defining a state). Useful for syntax highlighting.
Nickname SVN e nomi Git sono unificati per persona.
Add "defstate" token which functions identically as in M32script: synonymous with CON's "state" only at top-level (when defining a state). Useful for syntax highlighting.
amend action's viewtype -8 to be more in line with the others.
allow viewtype -8 for 'action', meaning to x-flip the shown sprite.
Similarly to how -5 and -7 and are accepted since r3859.
check EVENT_ENTERLEVEL for nonzero RETURN, run w/ other players then.
Background: AMC TC initializes per-player variables from this event.
Add player[].index, which returns the player ID that you put in. Mostly useful to get the magic value of THISACTOR when applied to the player struct.
DONT_BUILD.
Add projectile workslike flag PROJECTILE_NOSETOWNERSHADE = 0x00200000 = 2097152 that prevents actors from inheriting a projectile's shade when shooting it.
Add EVENT_WORLD, EVENT_PREWORLD, and EVENT_PRELEVEL, which respectively function as EVENT_GAME, EVENT_PREGAME, and EVENT_LOADACTOR, but only running once instead of per-actor.
Add token "appendevent", which functions identically to "onevent" except that the event's code is chained to the end of any previous events, instead of the beginning.
Add EVENT_DISPLAYROOMSCAMERA and EVENT_DISPLAYSTART.
EVENT_DISPLAYROOMSCAMERA functions exactly like EVENT_DISPLAYROOMS, including RETURN values, but for the ud.camerasprite >= 0 case. EVENT_DISPLAYSTART is executed immediately after the screen background is cleared and drawn. Ensure its RETURN value is zero, because it is currently not being used. WARNING: Consult the devs before using EVENT_DISPLAYSTART. Its position in the display code sequence is not finalized.
Add EVENT_DISPLAYCAMERAOSD. Set RETURN to -1 to disable it.
From this event, if "getactor[THISACTOR].htg_t 0" is zero, then the camera is functional. Nonzero values indicate the camera has been destroyed, which is only possible when the CAMERASDESTRUCTABLE parameter of gamestartup has been enabled.
Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.
Add "resetplayerflags". Flag 1 means "don't ask the user if they want to load".
Add "definevolumeflags", currently equipped to hide an episode from the single player and/or multiplayer screens.
enum { EF_HIDEFROMSP = 1<<0, EF_HIDEFROMMP = 1<<1, };
Extend undefinevolume so that it also undefines all levels in the specified volume.
Rename "cutscene" command to "startcutscene".
Add undefinevolume, undefineskill, and undefinelevel.
Amend retrieval of STR_*TIME for qgetsysstr, fixing LunaCON and possible oob.
- Add declarations of C functions to defs.ilua, names to dynsymlist, fix typo in con_lang.lua, ffi.string() calls in control.lua - Assert that G_LastMapInfoIndex() is always called with ud.last_level >= 1. (A stricter requirement than necessary to prevent follow-up oob accesses, but logically the most meaningful.) - In G_PrintParTime() and G_PrintDesignerTime(), return "<invalid>" if the above does not hold. This can happen from EVENT_NEWGAME, for example. Add a test to lunatic/test/qgetsysstr.con. DONT_BUILD.
Add read-only access to ud.config.MusicToggle through the "musictoggle" member.
Add STR_YOURTIME, STR_PARTIME, STR_DESIGNERTIME, and STR_BESTTIME to qgetsysstr.
Add new commands "getmusicposition" and "setmusicposition" that operate on the playback position of the current music track.
// Example: Switch between tracks like radio stations. getmusicposition temp starttrackvar next_music_track setmusicposition temp Only implemented for Ogg Vorbis, FLAC, and XA. Consult the devs before using these commands.
always return non-negative values from 'clipmove' and related.
Previously, the C function clipmove() returned negative values when hit a wall (32768+wallnum) or sprite (49152+spritenum) because internally, these values were encoded into a *signed* 16-bit integer. This made no difference to C code using it, since it always proceeded by bit checks, but was inconsistent with documentation on CON 'clipmove' on the wiki. The following commands are affected too, since they use the value returned by clipmove(): 'clipmovenoslide', 'movesprite'. Also, the value of actor[].movflag ('htmovflag' from CON). Also, fix 'clipmove*' in LunaCON and add lunatic/test/checknearwall.con as an example of how to implement a being-close-to-a-wall checker as requested in http://forums.duke4.net/topic/7869-determining-closeness-to-a-wall/