Commit graph

102 commits

Author SHA1 Message Date
Gustaf Alhäll
ddba6e80f7
Handle player state is P_MobjSetState 2023-12-23 13:45:16 +01:00
LJ Sonic
bc9a378521 Refactor userdata metatable registration 2023-10-27 20:17:27 +02:00
Sal
f11538c478 Make UDMF scale compatible with ZDoom's spec 2023-08-04 20:05:35 +00:00
Zwip-Zwap Zapony
0e2682d590 Add "drawonlyforplayer" and "dontdrawforviewmobj" 2023-07-25 11:05:29 -04:00
GoldenTails
4212035729 Fix errors due to declaring variables in switch bodies 2023-07-24 21:44:53 -05:00
Sally Coolatta
7c2a241042 Remove the need for setting rotation axis in spriteinfo for models
Now it just does it like Software
2023-07-24 04:40:15 -04:00
Gustaf Alhäll
2f2de7d3d3
Optimize field lookups in Lua metatables 2023-06-18 18:05:16 +02:00
sphere
ce504d4e8e Merge branch 'mobj-dispoffset' into 'next'
Turn dispoffset into a mobj field

See merge request STJr/SRB2!1708
2023-05-25 20:59:43 +00:00
spherallic
1470d099e3 Update copyright year & credits 2023-03-31 14:53:31 +02:00
Eidolon
34eebcb4b8 Reset interp scale when Lua sets .scale 2022-04-28 18:36:10 -05:00
Sally Coolatta
d476b41dfa P_SetOrigin & P_MoveOrigin to replace P_TeleportMove 2022-04-26 20:56:33 -05:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
lachablock
d764d68d02 Turn dispoffset into a mobj field 2022-01-13 18:53:26 +11:00
Monster Iestyn
090e5384d5 Merge branch 'blendmode-rangecheck' into 'next'
Handle invalid blend modes

See merge request STJr/SRB2!1486
2021-06-05 09:02:31 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
Jaime Ita Passos
548554431b Handle invalid blend modes properly 2021-04-27 00:20:41 -03:00
James R
8dd964e3a7 Lua: taglist.add and taglist.remove for sector tag lists 2020-12-05 02:02:06 -08:00
James R
314fd2783a Lua tag lists
Index and take length of tag lists like a table, 1-indexed. There are three
methods which may be used on tag lists:

list:iterate() - returns an iterator over the tags in the list
list:has(tag) - returns a boolean whether the tag is in the list
list.shares(list2) - returns whether two lists share a tag

"find" is also an alias to "has". Each method may be accessed from the global
taglist library too, e.g. taglist.iterate(list)

Tag lists may be compared with an equality operator too. This will tell you if
the two lists are composed of identical tags.

Accessible from sector.taglist, line.taglist and mapthing.taglist.
2020-12-04 13:53:27 -08:00
James R
621efbfa15 Lua taglib for accessing taggroups
The global "tags" can be iterated upon for every unique tag which is set in the
level. If a tag is set on a sector/line/thing, it will be included. Taking the
length of "tags" will give you the number of these unique tags. (If a tag is
set on multiple sectors/lines/things, it will only be counted once though.)

For sectors, lines and mapthings, call the field "tagged". This function takes
one argument, which is the tag. The return value can be iterated over for all
the sectors/lines/things with that tag. The length can also be taken for the
number of such objects. If no argument is given, the global tag is default.
2020-12-04 00:30:08 -08:00
Jaime Ita Passos
5e890ee6f8 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
Nev3r
c62ef355ef Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag
# Conflicts:
#	src/lua_baselib.c
#	src/lua_maplib.c
2020-10-27 20:48:25 +01:00
Jaime Passos
b872222b50 Implement blend modes 2020-10-27 00:03:41 -03:00
Jaime Passos
ab526e47cc Implement object-defined floor sprite slopes. 2020-10-14 00:57:13 -03:00
Jaime Passos
4273896311 Implement relative and absolute sprite offsets for objects (mobjs)
Added RF_ABSOLUTEOFFSETS and RF_FLIPOFFSETS
2020-10-13 12:57:36 -03:00
Jaime Passos
cc97e22e2f Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Zachary McAlpin
e5b6d19f57 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playercmd-kart-port 2020-07-30 15:37:41 -05:00
Nev3r
c65ada7dd7 Merge branch 'next' into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
2020-07-29 13:55:14 +02:00
Nev3r
6dfe236602 Merge branch 'udmf-next' into 'next'
Merge udmf-next into next

See merge request STJr/SRB2!1075
2020-07-28 14:03:59 -04:00
Zachary McAlpin
d26c7654ff Ported Lat's PlayerCmd hook to vanilla SRB2 2020-07-17 00:08:38 -05:00
kaysrishaq
7f9175033d minor lua fixes
minor lua fixes
2020-07-14 01:34:57 -04:00
Nev3r
ad55f5f872 Merge branch 'udmf-next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_ceilng.c
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_mobj.h
#	src/p_polyobj.c
#	src/p_saveg.c
#	src/p_setup.c
#	src/p_spec.c
#	src/p_spec.h
#	src/p_user.c
#	src/r_bsp.c
#	src/r_defs.h
2020-07-10 18:18:07 +02:00
Nev3r
fd5b05cafc Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next 2020-07-06 11:13:27 +02:00
kaysrishaq
cad1f57b1e FF_HORIZONTALFLIP and mobj->mirrored (sprite enhancements) 2020-06-19 11:11:18 -04:00
MascaraSnake
4a0206b38d Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/p_polyobj.c
2020-06-09 09:38:01 +02:00
LJ Sonic
e2b860dc28 Merge branch 'next' into 'fix-spawn-desynch'
# Conflicts:
#   src/p_map.c
2020-06-01 08:15:02 -04:00
Louis-Antoine
c6e13d0e30 Fix crash when setting a mobj's angle from a Lua script 2020-05-28 18:34:56 +02:00
SteelT
f0b64971a0 Merge branch 'next-lc-uint16' into 'next'
Custom skincolors

See merge request STJr/SRB2!960
2020-05-28 11:23:05 -04:00
Louis-Antoine
67eef5a37f Fix potential desynch when a player spawns 2020-05-28 11:03:35 +02:00
SwitchKaze
b37c73b008 Make colors UINT16, increase color freeslots to 1024 2020-05-23 19:35:36 -05:00
SwitchKaze
46191cade7 Update to 2.2.4 2020-05-22 16:47:51 -05:00
Monster Iestyn
4b7f0f49f1 added the ability to get the # of a mapthing_t in Lua 2020-05-22 18:32:34 +01:00
MascaraSnake
3170f2b8c3 Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/r_segs.c
2020-04-24 21:15:53 +02:00
Nev3r
ab7690346d Merge branch 'udmf-thingargs' into udmf-multitag
# Conflicts:
#	src/doomdata.h
#	src/lua_mobjlib.c
#	src/p_setup.c
2020-04-22 10:54:27 +02:00
Nev3r
de3ad9bc43 Merge branch 'udmf-next' into udmf-multitag
# Conflicts:
#	src/doomdata.h
#	src/p_setup.c
2020-04-22 09:11:17 +02:00
Nev3r
188ad67c58 Merge branch 'udmf-next' into udmf-thingargs
# Conflicts:
#	src/p_setup.c
2020-04-22 08:58:40 +02:00
Nev3r
3d9d9d74f6 Merge branch 'udmf-pitch-and-roll' into 'udmf-next'
Add textmap pitch and roll parsing, and mobj pitch and roll variables.

See merge request STJr/SRB2!882
2020-04-21 12:27:26 -04:00
Nev3r
aa98eb5a4c Add mapthing pitch/roll Lua access as well. 2020-04-19 17:19:04 +02:00
Nev3r
67acb6e498 Add Lua support. 2020-04-19 15:56:06 +02:00
Nev3r
ca10b38b9c Add textmap pitch and roll parsing, and mobj pitch and roll variables. 2020-04-19 14:51:55 +02:00
Nev3r
cde14c1d9f Fix an outrageous typo which didn't get pushed for some reason. 2020-04-19 12:23:51 +02:00