Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mine/Detpack Improvements #363

Open
4 tasks
Silverfang22 opened this issue Sep 4, 2022 · 1 comment
Open
4 tasks

Mine/Detpack Improvements #363

Silverfang22 opened this issue Sep 4, 2022 · 1 comment
Labels
discussion Requires discussion among developers. enhancement Improve or expand on the game.

Comments

@Silverfang22
Copy link
Member

Silverfang22 commented Sep 4, 2022

Hardcoded features to softcoded .wpn lines:

  • Linefx Location - XYZ offset the location of where the "beam" or "warning light" effect appears, currently creates a floating light on sequencer charges when used as mines

  • Cloaked - True/False (Currently any mine using firemode1 AKA proximity mode will cloak)

  • Firemode 0 vs 1 - Currently Firemode0 is hardcoded to be a tripmine, Firemode 1 is hardcoded to be a proximity mine, probably need to add an additional line such as "mineType" that's used for "type": "tripmine" e.g.:

      "firemode0": {
          "type":         "tripmine",
          "mineType": "proximity",
          "linefx":       "tripMine/glowbit_sequencer",
          "g2model":      "models/weapons/Charge_Sequencer/projectile.glm",
          "g2radius":     100,
          "armsound":     "sound/weapons/detpack/warning.wav",
          "firesound":    "sound/weapons/detpack/fire.wav",
          "miss":         { "sticksound": "sound/weapons/detpack/stick.wav" },
          "explodefx":    "explosives/demosmall",
      "displayName":  "Proximity"
      }
    
  • Issue Detonator Consumables delete themselves #282 - Special case for detpacks? Don't delete from inventory at 0 ammo as long as at least one detpack is placed and/or until detonator is used.

---- 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.

@Silverfang22 Silverfang22 added enhancement Improve or expand on the game. discussion Requires discussion among developers. labels Sep 4, 2022
@DarthFutuza
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Requires discussion among developers. enhancement Improve or expand on the game.
Projects
None yet
Development

No branches or pull requests

2 participants