local player = nil
if (unit:GetTypeId() == 4) -- 4 = Player
player = unit:ToPlayer()
GetObjectType returns the class name for ALL objects.
IE for player it returns "Player"
Its in the pushing function since it grabs the value registered for the class (type name). Its a method that all pushed objects have by default.I looked for that second, but I didn't expect it to be in LuaEngine.h.. I see it. Was looking for it in LuaFunctions.cpp.