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

Update base_npcs.lua #1256

merged 2 commits into from Nov 28, 2016


None yet
4 participants

Blixibon commented Oct 12, 2016

  • Medics can now heal allies, including Alyx, Barney, and even Vortigaunts. (caused by being in same squad)
  • Medics will drop a health vial when they die.
  • Zombies/Headcrabs and Antlions have their own squads.
    • Poison Zombies and Poison Headcrabs are in a different squad.
  • Vortigaunt Slaves are not in a squad. (unless they smuggle things, another reason not to trust these vorts)

Basically, everyone is in a squad now except for actor-derived NPCs like Kleiner or Breen who lack the AI required to make squads plausible.

}, "npc_odessa" )
AddNPC( {
Name = "Medic",
Class = "npc_citizen",
Category = Category,
KeyValues = { citizentype = CT_REBEL },
SpawnFlags = bit.bor( 8, 131072 ),

This comment has been minimized.


Bo98 Oct 12, 2016


Why use raw values here and not bit.bor( SF_NPC_DROP_HEALTHKIT, SF_CITIZEN_MEDIC )?

This comment has been minimized.


Blixibon Oct 12, 2016


I wrote that code about 5 months ago for a NPC enhancement mod, and I've always thought bit.bor only accepted integers. This is before I understood exactly what SF_FLAG_HERE definitions were, thinking they were only lua hooks at the time. I didn't think about it very much while making this pull request, except for wondering if there's another way to include multiple spawnflags.

I'll fix it as soon as possible.

@robotboy655 robotboy655 merged commit 289bdb7 into Facepunch:master Nov 28, 2016


This comment has been minimized.


robotboy655 commented Nov 28, 2016


I guess I should've seen this one coming...

robotboy655 added a commit that referenced this pull request Nov 28, 2016


This comment has been minimized.


Kefta commented Nov 28, 2016

Guess he pulled a code_gs


This comment has been minimized.


Blixibon commented Nov 29, 2016

I'm assuming I made this mistake when I updated the code to fit the recent base_npcs.lua revamp. Thank you for fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment