... | ... | @@ -18,17 +18,6 @@ Here is the full list of damage type constants currently in master branch (0 is |
|
|
* DMG_SPECTATOR - This allows you to kill spectators
|
|
|
* DMG_DEATHMASK - A special mask/flag constant that allows you to check if a damage type is "instant kill" or not (e.g. damagetype & DMG_DEATHMASK)
|
|
|
|
|
|
# Blockmap searching
|
|
|
This is basically a new Lua library consisting of a single function called searchBlockmap, which kind of does what it says on the tin. By default it searches around an object of your choice, either looking for other objects or linedefs. You can customise it to search in a specific area of the blockmap, however. Nev3r has already found this to be useful.
|
|
|
|
|
|
* Format of iteration function: `searchBlockmap(searchtype, function, mobj, [x1, x2, y1, y2])`. Returns true if search was uninteruppted, false if the iteration function returned true at any point
|
|
|
* *searchtype* can be either "objects" or "lines", for looking for mobj_t and line_t stuff in the blockmap respectively
|
|
|
* *function* is a function of your choice to iterate with: (sorry I can't get the next two bullets to be one indent further to the side)
|
|
|
- format of function needed: `funcname(mobj, foundmobj)` or `funcname(mobj, foundline)` (for searching for objects and lines, respectively)
|
|
|
- return value of *function* affects searching somewhat: nil doesn't change searching, false ends searching in a block (but doesn't stop searching, it just moves onto the next), and true ends the full search. Both returning true or false ultimately makes `searchBlockmap` return false.
|
|
|
* *mobj* is the reference mobj that you're checking around (if you don't supply x/y ranges to search in, it defaults to checking within the mobj's radius in both axes). If *mobj* was removed mid-search the search stops and `searchBlockmap` returns false
|
|
|
* (optional) *x1, x2, y1, y2* are coordinates on the map to search the blockmap between, if given
|
|
|
|
|
|
# New Lua hooks
|
|
|
* "ShieldSpawn" - A hook called when a shield orb spawning function (like P_SpawnShieldOrb, or any of the monitor spawning functions) is called. Takes player as argument. If returning true, do not spawn existing orb.
|
|
|
* "ShieldSpecial" - A hook called when pressing spin in midair and you have any shield in SH_NOSTACK (ie, not the fire flower). Takes player as argument. If returning true, do not perform existing shield actions.
|
... | ... | |