Garry's Mod

Garry's Mod

Deathbed
Octo  [开发者] 11 月 2 日 下午 3:53
Bug Reports
Did something happen that you think shouldn't have? Report it here!

Please, leave the following information:
- What happens, in detail
- How to reproduce it, in detail
- The Lua error from your console, if any
< >
正在显示第 1 - 15 条,共 20 条留言
Screddy 11 月 3 日 上午 12:51 
when i disable the deathbed npc command the npc turns invisible upon death
Octo  [开发者] 11 月 3 日 上午 5:40 
引用自 Screddy
when i disable the deathbed npc command the npc turns invisible upon death

Thanks for letting me know about this, I think I know why.

EDIT: This has been fixed
最后由 Octo 编辑于; 11 月 3 日 上午 5:56
The addon won't work with pre-spawned NPCs for some reason.

Edit: I'm using the x86-64 branch
最后由 TheBillinator3000 编辑于; 11 月 6 日 下午 12:18
Octo  [开发者] 11 月 6 日 下午 4:01 
Like map NPCs? That's odd. Are any errors in console or in the Problems window?
The only thing that comes up in the developer console while I have 'developer 2' enabled is "(14.82) input <NULL>: player.KilledNPC()". That's it. Nothing else happens.

When I spawn an NPC by using point_template and not the spawn menu, those NPCs won't get into beds when they die either.

When I spawn an NPC by using the developer console instead of the spawn menu, those NPCs won't get into beds when they die either.

Basically, anything that wasn't spawned by using the spawn menu won't go into a bed when they die.

Edit: Grammar.

Update: I tested this on the default branch of GMod and the bug persisted. Also, headcrabs that come off of zombies won't get into beds when they die.

Update: I don't know if this is intentional or not but the turrets won't go into beds when they die. Even if they were spawned by using the spawn menu. I can see this being a feature for the friendly turrets but I just want to make sure this isn't an actual big or not.
最后由 TheBillinator3000 编辑于; 11 月 7 日 上午 6:32
Bill Clinton 11 月 7 日 上午 9:27 
doesn't work on npcs spawned by npc daemon (and presumably other addons) either but i assume it's probably caused by the same thing as the issue above
Octo  [开发者] 11 月 7 日 下午 12:15 
I have a sneaking suspicion that this is actually a Garry's Mod bug and not a fault of my own. I will ask around and find out if that's true or if there's something I can do.
K4f3r 11 月 7 日 下午 1:42 
the texture of the bed doesnt work for me, do i need any game or addon to fix it?
Octo  [开发者] 11 月 7 日 下午 1:49 
Which part of the bed is a missing texture for you? It's made up of a few parts: The bedframe, the mattress, the blanket, the IV pole, the ropes, the monitor, and the balloon. the IV pole, ropes, mattress, monitor, and balloon should all work if you have the addon installed. The bed frame is an episodic texture I believe, which I thought came with gmod now.
最后由 Octo 编辑于; 11 月 7 日 下午 1:53
K4f3r 11 月 7 日 下午 2:39 
引用自 Octo
Which part of the bed is a missing texture for you? It's made up of a few parts: The bedframe, the mattress, the blanket, the IV pole, the ropes, the monitor, and the balloon. the IV pole, ropes, mattress, monitor, and balloon should all work if you have the addon installed. The bed frame is an episodic texture I believe, which I thought came with gmod now.
the bed frame texture is missing, im gonna check if i have half life 2 mounted
Bill Clinton 11 月 7 日 下午 2:51 
引用自 Octo
I have a sneaking suspicion that this is actually a Garry's Mod bug and not a fault of my own. I will ask around and find out if that's true or if there's something I can do.

Granted I don't really know much about lua so i haven't checked the code but if i had to guess, does it put npcs into a list of eligibility for deathbed transformation upon spawning rather than it just being an event that triggers upon death? I'm probably wrong but that theory would explain why it's dependent on the spawn method (probably doesn't add them to said list if not spawned through spawn menu since that's what it's tracking)

Or maybe I'm wrong and it's something else entirely
Octo  [开发者] 11 月 7 日 下午 3:19 
The only thing decided when they first spawn is whether or not they will become a deathbed via RNG and the deathbed_chance convar value. The OnNPCKilled hook takes care of actually doing this to them. But now that I say it out loud, I realize that the NPCs on the map never spawn after the hook runs that sets their chance, so it always fails and they will never become Deathbeds. I will fix this.
Bill Clinton 11 月 7 日 下午 4:20 
Will this also fix it not working on npcs spawned through other means (like addons or the dev console) or is that a separate issue?
Octo  [开发者] 11 月 7 日 下午 4:26 
I just pushed an update to fix this, and yes, it applies to NPCs spawned through all means, not just ones spawned by a player.
Bill Clinton 11 月 7 日 下午 4:49 
still doesnt work (now it doesnt work on regularly spawned npcs either) but at least gives a few proper errors now

[Deathbed] lua/autorun/sh_deathbed.lua:204: attempt to index global 'npc' (a nil value)
1. v - lua/autorun/sh_deathbed.lua:204
2. unknown - lua/includes/modules/hook.lua:102
3. Create - [C]:-1
4. GetGroupOBB - lua/sv_npcd_spawn.lua:191
5. TargetSpawnSquad - lua/sv_npcd_spawn.lua:2448
6. TargetSpawnPreset - lua/sv_npcd_spawn.lua:2478
7. func - lua/sv_npcd.lua:632
8. unknown - lua/includes/extensions/net.lua:34 (x4)


[Deathbed] lua/autorun/sh_deathbed.lua:204: attempt to index global 'npc' (a nil value)
1. v - lua/autorun/sh_deathbed.lua:204
2. unknown - lua/includes/modules/hook.lua:102
3. Create - [C]:-1
4. SpawnNPC - lua/sv_npcd_spawn.lua:411
5. SpawnSquad - lua/sv_npcd_spawn.lua:1555
6. unknown - lua/sv_npcd.lua:769 (x4)

[Deathbed] lua/autorun/sh_deathbed.lua:204: attempt to index global 'npc' (a nil value)
1. v - lua/autorun/sh_deathbed.lua:204
2. unknown - lua/includes/modules/hook.lua:102
3. Create - [C]:-1
4. InternalSpawnNPC - gamemodes/sandbox/gamemode/commands.lua:435
5. Spawn_NPC - gamemodes/sandbox/gamemode/commands.lua:609
6. unknown - gamemodes/sandbox/gamemode/commands.lua:641
7. unknown - lua/includes/modules/concommand.lua:54
< >
正在显示第 1 - 15 条,共 20 条留言
每页显示数: 1530 50