JKGDevs / JediKnightGalaxies

Jedi Knight Galaxies (JKG) is a multiplayer shooter with role playing elements, played out in the Star Wars universe. The project is a full conversion game modification for Jedi Knight: Jedi Academy.
https://www.jkgalaxies.net/
GNU General Public License v2.0
34 stars 12 forks source link

Mine/Detpack Improvements #363

Open Silverfang22 opened 2 years ago

Silverfang22 commented 2 years ago

Hardcoded features to softcoded .wpn lines:

---- Original Post ----

Currently there is no way to have a mine that can only be set off via proximity. It appears the way the game handles it is that firemode0 is always a laser, and firemode1 is always proximity. Possibly add the ability for charges to be able to have mine behavior as well? Haven't tested this, but would assume since the detection method is hardcoded it will not work for WP_DET_PACK.

On this note, it would be good to be able to define the proximity detection radius as well.

It appears that the "linefx" location is hardcoded. This works fine for the mines that use the base game model, however it should be set so that it uses tag_flash as a location instead.

Lastly, is there a good way to place these in levels via lua script? Would be good to be able to make traps for phase 2.

DarthFutuza commented 5 months ago

As a note, for adding charges via lua, extending the lua API to include void drop_charge (gentity_t *self, vec3_t start, vec3_t dir) (found in g_weapon.cpp), is probably a good place to start. Although we probably want to make a more generic helper function that interfaces with it directly and can handle more than just sequence_charges, but all types of emplaced explosives.