General > Developers Corner
Player damage & NPCs + Teams
Buzzkill:
For what it's worth, I'm starting to think the issue is around the handling of slash damage. The only other NPC that seems to have this issue is the antlion. Everything else I've tried (combine NPCs, hostile rebels, manhacks, anything poison based, etc) all work.
Doesn't help me much at the moment, since I see nothing in the way of slash damage being handled differently -- it's gotta be somewhere though.
Buzzkill:
Never mind, false lead. Manhacks are DMG_SLASH as well, and they work fine. So to recap:
* Player Team = 1 (or 2, or any non zero #), npc_zombie, npc_fastzombie and npc_antlion attack but do not register damage. JB.Gamemode.PlayerShouldTakeDamage override is never called. JB.Gamemode.EntityTakeDamage override is never called. My own hook to EntityTakeDamage is never called. All other npcs work fine (calls are made as expected and damage registers as expected)
* Player Team = 0, all npc's including zombie and antlion work fine, including all expected calls.
Argh.
Buzzkill:
Sorry for the spam. Final update for a while.
It has nothing to do with Jailbreak. If I set a team in Sandbox directly in PlayerInitialSpawn after the call to base, I get the same problem. This is the only change I made (didn't even have to set up teams or set GM.TeamBased). Just changing the player's team causes zombie damage to not register.
--- Code: ---function GM:PlayerInitialSpawn( ply )
BaseClass.PlayerInitialSpawn( self, ply )
ply:SetTeam(1)
end
--- End code ---
I've looked through npc_BaseZombie.cpp and didn't see anything jump out at me regarding zombie behavior against a teammember. At least I now know it's not the gamemode itself.
EDIT: It also has nothing to do with zombies. :) It's the NPC melee weapon logic. I dropped some unarmed combine soldiers in and their roundhouse elbows are exhibiting the same problem as the zombie slashes. (I didn't realize this earlier, as my previous experiments with soldiers were at a distance, so they used their ranged weapons, not melee weapons).
JamminR:
I'd now be reaching far outside my educated hypotheses guesses.
Bug in team vs slash damage code in Gmod.
I'd dare say, if you haven't already, bring this up at Facepunch.
Our small community can only test it so far. (And, how would one go about submitting a real bug to Gmod devs? WeBrett emailed Garry one time and he responded, but, I doubt that would ever happen again)
Bytewave:
--- Quote from: JamminR on March 02, 2015, 07:40:51 PM ---I'd now be reaching far outside my educated hypotheses guesses.
Bug in team vs slash damage code in Gmod.
I'd dare say, if you haven't already, bring this up at Facepunch.
Our small community can only test it so far. (And, how would one go about submitting a real bug to Gmod devs? WeBrett emailed Garry one time and he responded, but, I doubt that would ever happen again)
--- End quote ---
This seems to be the place for (confirmed) issues.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version