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
toaster
a6fd2275dd
P_PlayerCanDamage(player_t*, mobj_t*), ported from the abandoned project_birthday because GOD the code looks awful with those huge monolith conditions in it. Available to Lua.
...
(Also, minor fixes to lib_pSpawnLockOn, and removing the SH_OP fuckery.)
2019-06-19 12:09:02 +01:00
mazmazz
2eb04ab17d
Merge branch 'public_next'
2019-03-14 22:15:34 -04:00
mazmazz
5807384dbd
Remove S_MusicExists lua
2019-01-02 06:26:18 -05:00
mazmazz
0724d042bc
Add safe lua music functions
...
S_MusicExists
S_SetInternalMusicVolume
S_StopFadingMusic
S_FadeMusic
S_FadeOutStopMusic
2019-01-02 04:58:03 -05: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
mazmazz
2326a58bc7
Merge remote-tracking branch 'public-gl/master' into public-musicplus-core
2019-01-01 10:41:40 -05:00
Latapostrophe
47a329807a
Merge branch 'next' into SRB2-CHAT
2018-12-23 22:53:24 +01:00
Latapostrophe
09dbb6d631
Fixed various issues: added some free()s, lua_optboolean, other things, and also made sure chat can't send empty messages.
2018-12-22 12:34:17 +01:00
mazmazz
e6954eae30
Fix lua_pop -> lua_remove use in G_SetCustomExitVars lua
2018-12-20 10:56:36 -05:00
Digiku
12fc077e01
Merge branch 'lua-nextmapoverride' into 'next'
...
Lua: nextmapoverride & skipstats changing outside of G_ExitLevel
See merge request STJr/SRB2!396
2018-12-20 10:55:30 -05:00
TehRealSalt
b5d86d7263
Let lib_gExitLevel call lib_gSetCustomExitVars, for reduced code duplication.
2018-12-18 15:03:54 -05:00
TehRealSalt
3cecf00c83
G_SetCustomExitVars for setting nextmapoverride & skipstats
...
This is desparately needed for KIMOKAWAIII, since there's many instances I need to change nextlevel but still want to use the existing player exit stuff.
2018-12-18 14:48:04 -05:00
mazmazz
6a87980afd
Mixed D&C fixes; replace a couple int's with INT32
2018-12-17 19:02:22 -05:00
Latapostrophe
4c88271cfb
2.1.21 and all of the kart additions. Woo.
2018-12-17 20:43:59 +01:00
TehRealSalt
4d8fe70aa7
Undo 53dfb4c8
2018-12-16 21:36:54 -05:00
TehRealSalt
f5a0d52749
Merge remote-tracking branch 'upstream/next' into kart-luatextures-backport
2018-12-16 21:22:06 -05:00
TehRealSalt
672b948b92
Foolish
2018-12-16 18:19:53 -05:00
Alam Ed Arias
8a47cf93f6
Revert "Merge branch 'kart-luatextures-backport' into 'next'"
...
This reverts merge request !387
2018-12-16 22:57:39 +00:00
TehRealSalt
dde29e47c5
Expose R_TextureNumForName
...
Backport from SRB2Kart
2018-12-16 15:58:47 -05:00
Latapostrophe
34f13e9f20
merge conflict
2018-12-16 16:48:15 +01:00
Monster Iestyn
94ad0b880f
Merge branch 'next' into 21-version
...
# Conflicts:
# src/d_netcmd.c
2018-12-02 15:45:07 +00:00
TehRealSalt
a71644f230
IsPlayerAdmin support, since admin was removed
...
# Conflicts:
# src/lua_baselib.c
2018-11-29 07:12:15 -06: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
Monster Iestyn
685c8312cb
Add P_GetZAt to Lua
2018-10-20 21:08:59 +01:00
mazmazz
a3664c3083
Lua P_RestoreMusic else if fix
2018-09-18 15:11:37 -04:00
mazmazz
9c89bf3fef
MusicPlus core: Lua separation fixes
2018-09-18 11:39:08 -04:00
mazmazz
c213c23af3
420: Don't interrupt existing light fade on duration timing except EFFECT5
...
(cherry picked from commit 3b957c32517a8f5148940c0067af7e88a51d1fee)
2018-09-18 11:08:33 -04:00
mazmazz
32c48af258
MusicPlus Core (positioning and fading) 2.2 -> 2.1 backport
2018-09-18 10:22:17 -04:00
mazmazz
cbf692fc52
Revert "Snap light level to software values (32 levels)"
...
This reverts commit 8ec3e23ed5 .
2018-09-09 13:43:00 -04:00
mazmazz
8ec3e23ed5
Snap light level to software values (32 levels)
...
* New properties `exactlightlevel` and `lightlevel` in `lightlevel_t`
2018-09-08 23:01:35 -04:00
mazmazz
07c6705bdb
Implemented tic-based light fading
...
* ML_BLOCKMONSTERS specifies destvalue and speed by texture offsets
* ML_NOCLIMB toggles tic-based logic
* Added props `duration`, `interval`, and `firsttic` to `lightlevel_t`
2018-09-08 22:10:51 -04:00
Latapostrophe
fe0b6dc600
Fix old chat detection.
2018-08-19 11:12:21 +02:00
Latapostrophe
a4bded8e9e
SRB2chat test rework
2018-07-31 11:10:02 +02:00
toasterbabe
e158a405f3
* Add new damagetype flag (DMG_CANHURTSELF) that allows a player to hurt themselves indirectly.
...
* Add damagetype to P_RadiusAttack (optinteger in lua, A_Explode var1).
* Removed the prevention of MF_BOSS objects from getting P_RadiusAttacked. This was a holdover from DooM (I checked) - a way to prevent the Cyberdemon from gibbing itself when firing point blank into a wall, and also a way to make it and the Spider Mastermind harder.
* Enemies are solid to other enemies movement-wise now.
* (Fun little aside - if you remove MF_SOLID from a monitor, it now behaves like they did in Sonic Adventure (poppable by colliding with, not just attacking).
* Fixed Metal Sonic battle conflict in MF_PAIN/mass not picked up earlier.
* Miscellaneous tiny code tweaks.
2018-05-08 23:26:36 +01:00
toasterbabe
504f162b59
Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into delag_maces
...
# Conflicts:
# src/p_mobj.c
2018-04-07 01:54:43 +01:00
toasterbabe
1ac48b08d0
Mace optimisation!
...
* Handle all chain objects as a hnext/hprev chain.
* When removing mobjs with hnext/hprev, "repair the chain" (make the h links meet).
* Fix hidden slings, which I accidentially broke when I revamped maces the first time.
* Kill MF2_MACEROTATE. Not needed for anything anymore.
* P_MaceRotate now available to Lua to make up for it.
* Related: Made modifying hnext/hprev using Lua safer, so it keeps the reference counts in play.
2018-04-01 20:54:19 +01:00
toasterbabe
c959806e23
* M_Random function access to v! (so v.RandomFixed(), etc...)
...
* Remove deprecated P_Random() from Lua.
2018-03-20 15:00:27 +00:00
toaster
82a868ec8f
Merge branch 'lua-sector-find-funcs' into 'master'
...
Lua sector find funcs
See merge request STJr/SRB2Internal!127
2017-11-02 16:46:16 -04:00
toaster
c84d4261d1
Merge branch 'unca_scrooge' into 'master'
...
The hardcoded part of ACZ3 so far
See merge request STJr/SRB2Internal!124
2017-11-02 16:43:11 -04:00
Monster Iestyn
2cccb81d7f
Merge branch 'master' into lua-sector-find-funcs
2017-11-01 19:14:44 +00:00
Monster Iestyn
440ada120d
Merge branch 'master' into lua-action-userdata
2017-10-30 21:33:40 +00:00
Monster Iestyn
1d11797b47
Added six new functions from p_spec.c/h to Lua
2017-10-30 20:09:41 +00:00
toasterbabe
eea5c9d56a
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into unca_scrooge
...
# Conflicts:
# src/dehacked.c
# src/info.h
# src/p_enemy.c
2017-10-21 12:48:41 +01:00
Alam Ed Arias
1be137f461
cleanup
2017-09-28 11:10:24 -04:00
toasterbabe
4da6169892
Add spr2defaults[] array to make sprite2 defaulting system much, much simpler to manage.
...
This is in preparation for a seperate project which still involves sprite2s.
2017-08-25 18:00:20 +01:00
Monster Iestyn
9f726bc66d
Merge branch 'new_coop' into 'master'
...
New Co-op
See merge request !104
2017-08-16 15:01:39 -04:00
toasterbabe
a00deee209
* Combine all shield-giving functions into a single one, since they were practically identical anyways.
...
* Expose P_SwitchShield(player, shieldnum) to Lua.
2017-08-10 13:57:09 +01:00