ModDota / BugTracker

Listing bugs for Dota 2 Custom Games
9 stars 1 forks source link

Entities:SetAbsOrigin fails on non-NPC-inherited entities #91

Open Arhowk opened 7 years ago

Arhowk commented 7 years ago

When you spawn an entity that isn't an NPC you get some pretty weird behavior regarding GetAbsOrigin. ent:GetAbsOrigin() will return fine, but anything in C++ that tries to interact with the origin fails. For example if you try to follow the entity (as in SetCameraTarget) than it will follow an undefined position. Just as well, JS calls on any entity like this will simply return null.

Setting the abs origin via :SetAbsOrigin() had no help on the issue.

Reproduction steps:

  1. Spawn an entity as follows: SpawnEntityFromTableSynchronous('info_target', {origin = Vector(x,y,z)})
  2. Attempt to call Entities.GetAbsOrigin on this entity

Result: "null"