Garry's Mod

Garry's Mod

Rebel Enemy Animation Fix
54 条留言
Myofuer 10 月 1 日 上午 9:55 
Why does some npc does no melee damage at all? I saw that someone mentioned the same problem before in this thread but that doesn't help, I want to fix the those npc addons and want to know where to start
ColdMoon  [作者] 8 月 11 日 下午 10:37 
Try “melee_fix_else 0” to turn off melee fix for npc_citizen and npc_metropolice see if it helps.
Otchimus Prime 8 月 11 日 下午 1:18 
With some mods this thing ruin fps to negative values
AfghanElfenLiedBlasphemer 𖤐 7 月 29 日 上午 7:38 
oh ok then
ColdMoon  [作者] 7 月 29 日 上午 7:22 
Sorry, bot isn’t within the scope of what this addon is designed to handle.
AfghanElfenLiedBlasphemer 𖤐 7 月 29 日 上午 6:53 
well, there´s one where the bot floats and stretches apart weirdly
ColdMoon  [作者] 7 月 29 日 上午 5:34 
@Sodkra Which issue are you referring to? Most of the problems mentioned in the comments have already been fixed by now.
AfghanElfenLiedBlasphemer 𖤐 7 月 28 日 上午 11:32 
hey author, did you fix the problem? if yes, i´d love to download the addon rn
ColdMoon  [作者] 7 月 11 日 上午 3:43 
I added a limit so it only loops up to 10 times, so it won't keep generating the problem endlessly anymore.
ΆΛΦΑ 7 月 11 日 上午 2:57 
@Coldmoon it does appear every 10 to 15 sec, but i've had instance where it appears every 5 seconds
ColdMoon  [作者] 7 月 10 日 下午 5:34 
@ΆΛΦΑ That is a dummy used to obtain the activity ID. It will be removed once the ID is retrieved. If you notice this message appearing roughly every 15 seconds, please let me know—that means the code is failing to retrieve the ID correctly and is stuck in a loop.
ΆΛΦΑ 7 月 10 日 上午 10:07 
WARNING ! this addon causes the following error NPC npc_combine_s stuck in wall--level design error at (-128.00 -576.00 -22286.15) it spawns a combine NPC at random location outside the boundaries of maps which can make your game lag due to console overload
ColdMoon  [作者] 7 月 10 日 上午 12:05 
@Male_09 Not for the gmod's default one.
Male_09 7 月 9 日 下午 2:58 
who even has this error? is this supposed to be for garry's mod default hostile rebel or for addon ones? since gmod's default one is just a rebel that was coded to be an enemy, so it shouldnt shove when youre too close or dance when hit by bugbait.
ColdMoon  [作者] 7 月 9 日 上午 3:06 
@Twilight They might use player animation, If there were sound effects when they reload. That means it really was this addon that fixed their inability to reload. But the root cause of the problem is that the NPC model creators didn’t properly apply the correct NPC animations during development—they just lazily used player animations instead.
Twilight 7 月 8 日 上午 11:45 
i have a problem with the npc's using the ar2 they can fire the weapon but T-pose after they use all the ammo and subscribed to this addon it fixed it somewhat but they still kinda do the T-pose and the reload animation looks all weird any idea why this happens? if anyone else has this issue how can i fix it?
ColdMoon  [作者] 7 月 3 日 上午 3:29 
@Qöuji melee_fix_else 0 to turn off melee fix for npc_citizen and npc_metropolice
( '• ω •' ) 7 月 2 日 下午 7:05 
causes occasional big lag spikes when there are many npc_citizens on the map
Twilight 6 月 27 日 上午 3:11 
this only somewhat fixes the ganyu, nilou & shenhe alternate outfits for the genshin alternate outfits they still sorta do the T-pose sad cause those 3 are my favorite characters
reecha1234567890 6 月 2 日 下午 8:54 
Thank you for this
xFreemanEmer 5 月 8 日 上午 4:55 
Excellent addon, you deserve an award...
geoffreyallen1007 4 月 22 日 下午 4:25 
how did u get it to be ur player modli
nope 4 月 21 日 下午 2:37 
@ColdMoon sorry. i realized now this was just addon conflict. thanks for reply.
ColdMoon  [作者] 4 月 21 日 上午 1:10 
@nope this addon disables crouching for the rebel enemy because it is highly error-prone. Rebel enemies should never crouch at all. Which NPC are you using? Give me a link so I can check it out.
nope 4 月 20 日 下午 11:02 
when npc's holding shotgun, they will T-pose when crouch shot pose.
ColdMoon  [作者] 4 月 17 日 下午 8:20 
@Selever-天空皇帝束缚者 shotgunreplace 0 to turn it off, rebel enemy shotguner always stand still, will find a way to fix in the further, now replace their weapon instead.
Selever-天空皇帝束缚者 4 月 17 日 上午 8:00 
strangely when you choose shotgun as npc‘s weapon it will become smg or pulse rifle
Selever-天空皇帝束缚者 4 月 17 日 上午 7:12 
good
Ty4a 4 月 17 日 上午 4:15 
great
ColdMoon  [作者] 4 月 17 日 上午 4:12 
@Ty4a I followed your advice and made the changes you suggested. Thanks for your guidance.
10sm peek//RuKaBLOOD 4 月 17 日 上午 3:30 
THANK YOU!
Ty4a 4 月 16 日 下午 2:36 
Also you can use metatable optimization

local meta = FindMetaTable("Entity")
local GetPos = meta.GetPos

then GetPos(ent) is faster
Ty4a 4 月 16 日 下午 2:35 
Use caching
Ex:
local CVar = CreateConVar(...)

CVar:GetBool()

or you can use cvars.AddChangeCallback

also create table for npcs and from hook EntityCreated EntityRemoved (as I remember) remove/write npc to table, its replacing finding entities in think hook

Use local pos = ent:GetPos() ; local wep = ent:GetActiveWeapon()

:steamhearteyes: good luck
ColdMoon  [作者] 4 月 16 日 下午 1:21 
The Think hook is optimized by only check when NPC activity changes, old one check every frames and cause lag
Ty4a 4 月 16 日 下午 1:07 
I don't have any lags, but after reading the comments I checked the code and it turned out to be completely unoptimized :P
ColdMoon  [作者] 4 月 16 日 下午 1:04 
Maybe my PC configuration is pretty good, I will test it on my poor laptop and try my best to optimize
Ty4a 4 月 16 日 下午 12:33 
useful, but code isn't really optimized
wrenchuser 4 月 15 日 下午 10:09 
1 frames per sometimes
Selever-天空皇帝束缚者 4 月 15 日 上午 7:14 
Oh I found it has some conflict with wos animation instead of the model problem
ColdMoon  [作者] 4 月 15 日 上午 2:01 
@Selever-天空皇帝束缚者 That doesn't happen to me, which NPC are you using? Give me a link so I can check it out.
Selever-天空皇帝束缚者 4 月 15 日 上午 1:15 
Why doesn‘t their melee attack cause any damage
Still stork🎃🔨 4 月 14 日 下午 5:42 
Nice fix, but tf is that npc bruh....
アカリ 4 月 14 日 下午 12:01 
so useful
Newman 4 月 13 日 下午 11:20 
DEHYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
MMWWVVK 4 月 13 日 上午 6:52 
GOOD:steamthumbsup:
ColdMoon  [作者] 4 月 12 日 下午 10:14 
@The Celestial Should have been solved by adding a valid check, thanks for your feedback : )
The Celestial 4 月 12 日 下午 2:48 
[Rebel Enemy Animation Fix] lua/autorun/missing_anim.lua:109: Tried to use a NULL entity!
1. GetActivity - [C]:-1
2. unknown - lua/autorun/missing_anim.lua:109
I got this error on start
ColdMoon  [作者] 4 月 12 日 下午 1:45 
@Soldier Dink that is the dummy to get correct activity id for fixing, for some reason the code loop while it fail to get the id. Definitely not a jumpscare,I am sorry the code when wrong that way. I will change the postion where the dummy spawn.
Soldier 4 月 12 日 下午 1:26 
for some reason, this addon started creating a burning npc_combine_s entity directly on the player before immediately being deleted and repeating. what??
ColdMoon  [作者] 4 月 12 日 下午 12:53 
Which NPC are you using? Give me a link so I can check it out.