Commit graph

70 commits

Author SHA1 Message Date
SteelT
c5f9a586a0 Merge lua_hook.h 2020-08-04 00:58:37 -04:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
James R
61a4fe06d5 Merge branch 'bot-respawn-hook' into 'next'
BotRespawn hook

See merge request STJr/SRB2!804
2020-04-09 19:52:25 -04:00
Wolfy
1d1b1514b4 Remove stupid dumbfuck #ifdefs
WHY THE FUCK DID THESE BREAK IT AAAAAAAAAAAAAAAAAAA
2020-04-07 05:24:38 -05:00
Wolfy
e9bbdb8cc3 Reimplement the MusicChange hook
why the fuck was this removed
2020-04-05 12:09:44 -05:00
Louis-Antoine
46df2b9551 Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
fickleheart
2176136480 Rename hook to ShouldJingleContinue 2020-03-18 22:35:21 -05:00
Latapostrophe
af4922b53e VoteThinker Hook for Lua 2020-03-10 18:58:44 +01:00
fickleheart
5aebc0ed6d Add JingleStatus hook for carrying custom jingle tunes
The extra argument is the music name, as passed into
P_PlayJingleMusic(player, musname), to run the hook for, optional.
Arguments are (player, musname) - the latter to allow global hooks
that still differentiate between different tracks.
2020-02-23 17:20:44 -06:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Sally Cochenour
4735788e60 BotRespawn hook
Lets you force when and when not to respawn the bot
2020-02-12 14:16:23 -05:00
Louis-Antoine
a997683d1c Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into keep-body
# Conflicts:
#	src/g_game.c
#	src/p_setup.c
2020-01-22 03:57:22 +01:00
Louis-Antoine
c2682ac1b6 Let clients rejoin the server without losing their status
This is accomplished by simply preserving
the player's body after disconnecting.

Bodies will despawn after the number of minutes
specified by the "rejointimeout" console variable (float).
A value of 0 disables the feature completely.

Clients rejoining are identified by their IP address,
and may rejoin even if the server is full or joins are disabled,
for as long as their body remains.

From a technical standpoint, when the user disconnects,
the player they were controlling does not leave,
the underlying player_t just keeps working normally,
except it does not receive any input anymore.
When the user reconnects, they are simply "relinked"
to their player_t.

Those "soulless" players can be identified through
their "quittime" field, which is the number of tics
elapsed since the user disconnected, or zero
if still connected. "quittime" is exposed to Lua.
2020-01-22 03:05:08 +01:00
Zachary McAlpin
6f60341aec Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playerthink-hook 2020-01-08 18:52:56 -06:00
James R
2a6cf10f79 Merge branch 'lua-neatstuff' into 'next'
Extra functionality for lua

See merge request STJr/SRB2!601
2020-01-05 20:54:17 -05:00
Zachary McAlpin
7c0021aaac Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playerthink-hook 2020-01-01 17:11:19 -06:00
Jaime Passos
0ab6fe1fd8 Rename `seenplayer to seenfriend` 2020-01-01 15:17:29 -03:00
Nami
9219699b42 Add MobjLineCollide hook 2019-12-31 15:17:02 -08:00
Jaime Passos
a811021112 **NEW!** hook_SeenPlayer 2019-12-31 14:37:45 -03:00
Nami
4456ff50ab Revert changes to searchBlockmap because on reflection, the benefits didn't outweigh breaking every current usage of it
Readd ThinkFrame in its original position
PostThinkFrame now runs at the end of P_Ticker, only MapEnd runs after it
2019-12-30 19:04:27 -08:00
Nami
e4d1b9491c Let's try this again! 2019-12-29 20:36:24 -08:00
Zachary McAlpin
e4e233d4de Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2 into playerthink-hook 2019-12-26 17:29:54 -06:00
Jaime Passos
c832d26ee9 ViewpointSwitch improvements. 2019-12-23 20:22:57 -03:00
Zachary McAlpin
324b05032c Revert "Added CalculateCamera Hook"
This reverts commit b545a13312.
2019-12-19 17:21:55 -06:00
Zachary McAlpin
435f70ff85 Revert "Fix CalculateCamera compiling error"
This reverts commit 91ebec08c6.
2019-12-19 17:21:46 -06:00
Zachary McAlpin
91ebec08c6 Fix CalculateCamera compiling error 2019-12-19 17:17:17 -06:00
Zachary McAlpin
b545a13312 Added CalculateCamera Hook 2019-12-19 16:41:25 -06:00
Jaime Passos
b65c6e3745 Shadowed variable declarations whoopsie!!! uwu 2019-12-18 23:53:26 -03:00
Jaime Passos
e47f171533 TeamSwitch hook for Lua 2019-12-18 23:40:58 -03:00
Jaime Passos
0e3bf527a2 ViewpointSwitch hook for Lua 2019-12-18 20:43:54 -03:00
Zachary McAlpin
a51475d5b7 Added PlayerThink hook 2019-12-14 15:28:24 -06:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
Steel Titanium
c20023d35f New intermission thinker hook 2019-10-13 20:50:46 -04:00
toaster
6f1128c84d "PlayerCanDamage" hook!
* Takes function(player, mo) input.
* Return TRUE for stating that yes, the player is in a state that can cause contact damage, do with that what you will.
* Return FALSE for stating that no, the player is weak and vulnerable and cannot cause contact damage, do with that what you will.
* Return NIL for allowing the function to continue regular operation.

Fills a different ideological niche than ShouldDamage - that's for determining whether damage dished between two objects should happen, this is for determining which way around damage should be dished when considering a player-object interaction.

Or, in other words, think of it as "ShouldDamage is whether damage that has been requested should be granted, for object-object interaction, while PlayerCanDamage is for whether global player properties should cause damage to enemies and monitors in the first place, like spinning, hammering or stomping."
2019-06-19 12:55:05 +01:00
Steel Titanium
3e838c1e83 New IntermissionThinker hook 2019-04-22 00:29:47 -04:00
Latapostrophe
62f1ac6ef6 Expose some more Kart functions, freeplay and rankings bumpers are now hud stuff you can toggle, + experimental playercmd hook 2019-01-13 14:40:48 +01:00
mazmazz
81352aece1 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
TehRealSalt
a1bdfb1272 Merge remote-tracking branch 'srb2public/next' into merge-next 2018-12-03 00:31:23 -05:00
Jimita
a32fb94e09 Merge branch 'next' into lua_mapchange 2018-11-30 15:10:59 -02:00
MPC
e745cb60fc Change MapChange so Lua returns the map number you change 2018-11-30 14:01:40 -03:00
TehRealSalt
4507ee18fd Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
Latapostrophe
a6bea8483f Separated the damage hooks into multiple more precise hooks for players. 2018-11-27 18:27:43 +01:00
Monster Iestyn
d824e05a6f Merge branch 'master' into next 2018-11-25 20:39:17 +00:00
mazmazz
c91b2b4456 Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
Monster Iestyn
7989e9a482 Merge branch 'public_next'
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/dehacked.c
#	src/g_game.h
#	src/hardware/hw_draw.c
#	src/hardware/hw_main.c
#	src/lua_baselib.c
#	src/lua_hook.h
#	src/lua_hooklib.c
#	src/lua_hudlib.c
#	src/lua_libs.h
#	src/lua_maplib.c
#	src/lua_script.c
#	src/m_misc.h
#	src/p_mobj.c
#	src/s_sound.c
#	src/sdl12/mixer_sound.c
#	src/w_wad.c
2018-11-10 15:41:57 +00:00
TehRealSalt
5b6efcba0c Merge remote-tracking branch 'srb2public/next' 2018-11-08 17:37:05 -05:00
Monster Iestyn
1200793a94 Merge branch 'Playerquit_hook' into 'next'
"PlayerQuit" Lua Hook

See merge request STJr/SRB2!127
2018-11-08 15:53:35 -05:00
wolfy852
eca78519e4 Chat Manager 2018-06-15 05:20:01 -05:00
toasterbabe
844416855f Smiles follow-mobj initial support! Still using a Lua hook to follow closely behind, but now it doesn't need to be a generic thinkframe. Woo! 2017-10-02 14:08:58 +01:00
Monster Iestyn
a6f830ddff Add the "MapThingSpawn" hook to Lua 2017-04-15 21:41:22 +01:00