pac3 icon indicating copy to clipboard operation
pac3 copied to clipboard

'Spawn As Props' tool broken as of July update & Development Branch

Open Ek-Videogames opened this issue 4 years ago • 2 comments

When attempting to 'spawn as props' an outfit, the game instead will spawn only the first part in the outfit - and it will spawn its model in a glitched state that has no physics, no collisions, not grabbable by physgun beam, not selectable by any tool, and not in undo buffer either. ( Basically only a glitched floating model of the prop that cannot be interacted with in any way and only deleteable by clearing the map )

Pac editor puts a trace in console which is as follows:

Trace:

1: Line 32	"Trace"		lua/includes/extensions/debug.lua
2: Line 40	"nil"		lua/pac3/editor/server/util.lua
3: C function	"SetColorOriginal4"
4: Line 192	"SetColor"		lua/includes/extensions/entity.lua
5: Line 28	"spawn"		lua/pac3/extra/server/contraption.lua
6: Line 113	"nil"		lua/pac3/extra/server/contraption.lua
7: C function	"xpcall"
8: Line 39	"PCallCriticalFunction"		lua/pac3/editor/server/util.lua
9: Line 56	"func"		lua/pac3/editor/server/util.lua
10: Line 32	"nil"		lua/includes/extensions/net.lua

Ek-Videogames avatar Jul 03 '21 18:07 Ek-Videogames

Update:

This issue still persists on the current development build.

  • Pac3 still only spawns the first part in the file
  • The prop now properly exists in physics, collision, and sandbox undo-buffer. Whereas before it would only render and be not interactable in any way.
  • The prop does not spawn frozen, falling to the ground the moment it appears

The only difference appears to be that changes in pull-request https://github.com/CapsAdmin/pac3/pull/1077 have allowed the first prop to spawn with a correct entity.

Trace:
	1: Line 32	"Trace"		lua/includes/extensions/debug.lua
	2: Line 40	"nil"		lua/pac3/editor/server/util.lua
	3: C function	"SetColorOriginal4"
	4: Line 192	"SetColor"		lua/includes/extensions/entity.lua
	5: Line 32	"spawn"		lua/pac3/extra/server/contraption.lua
	6: Line 113	"nil"		lua/pac3/extra/server/contraption.lua
	7: C function	"xpcall"
	8: Line 39	"PCallCriticalFunction"		lua/pac3/editor/server/util.lua
	9: Line 56	"func"		lua/pac3/editor/server/util.lua
	10: Line 33	"nil"		lua/includes/extensions/net.lua

In a rather brute-force approach to debugging I commented out the lines handling getting color data from the server, I've discovered the issue still persists with a new trace pointing towards the CPPIGetOwner function. I'm not sure as to why color was getting flagged in the first place but that's a problem to investigate at another time.

Trace:
	1: Line 32	"Trace"		lua/includes/extensions/debug.lua
	2: Line 40	"CPPIGetOwner"		lua/pac3/editor/server/util.lua
	3: Line 36	"spawn"		lua/pac3/extra/server/contraption.lua
	4: Line 113	"nil"		lua/pac3/extra/server/contraption.lua
	5: C function	"xpcall"
	6: Line 39	"PCallCriticalFunction"		lua/pac3/editor/server/util.lua
	7: Line 56	"func"		lua/pac3/editor/server/util.lua
	8: Line 33	"nil"		lua/includes/extensions/net.lua

Commenting out the lines 36 to 38 and - IT WORKS [PAC3] Spawning contraption by Videogames<STEAM_#:#:########> with 3 entities

I personally can't seem to figure out where this particular function is needed elsewhere in the mod, but this is no-doubt some highly important server reason that I don't understand so you'll need some actual solution to figure out what the deal is with that...

Ek-Videogames avatar Feb 07 '22 22:02 Ek-Videogames

The mentioned PR should fix the color issue, the other one I'm not sure but feel free to give it a try.

Yagira avatar Feb 08 '22 00:02 Yagira