Skip to content
Snippets Groups Projects
Select Git revision
  • changeskin_hook
  • discord_next
  • discord
  • masterserver-fd-fix
  • keycodes-only
  • keysyms
  • master default protected
  • g_findmap-lua
  • more-lua-map-names
  • larger-chat
  • FALLTHRU
  • snac-bruh
  • mserv-is-dumb-and-what-else-is-new
  • next
  • udmf-next
  • fix-node-player-mixups
  • disable-titlemap-in-netgames
  • refactor-kicks
  • more-cleanup
  • file-param-error
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
  • SRB2_release_2.1.20
  • SRB2_release_2.1.19
  • SRB2_release_2.1.18
  • td-release-v1.0.0
  • SRB2_release_2.1.17
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.16
  • SRB2_release_2.1.15
  • SRB2_release_2.1.14
  • SRB2_release_2.1.12
  • SRB2_release_2.1.11
  • SRB2_release_2.1.10
  • SRB2_release_2.1.9
  • SRB2_release_2.1.8
40 results

lua_hooklib.c

Blame
  • Forked from Jan-Jaap Korpershoek / SRB2
    2576 commits behind the upstream repository.
    toaster's avatar
    toaster authored
    * 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."
    3eb9b85f
    History
    lua_hooklib.c 31.52 KiB