MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASReadCharacterID

Function ASReadCharacterID

Source/Scripting/angelscript/asfuncs.cpp:3088–3101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3086}
3087
3088MovementObject* ASReadCharacterID(int which) {
3089 if (which == -1) {
3090 std::string callstack = active_context_stack.top()->GetCallstack();
3091 LOGW << "Called ReadCharacter ID with parameter -1 from\n " << callstack.c_str() << std::endl;
3092 return NULL;
3093 }
3094 Object* obj = the_scenegraph->GetObjectFromID(which);
3095 if (!obj || obj->GetType() != _movement_object) {
3096 std::string callstack = active_context_stack.top()->GetCallstack();
3097 LOGE.Format("There is no movement object with id %d\n Called from:\n%s\n", which, callstack.c_str());
3098 return NULL;
3099 }
3100 return (MovementObject*)obj;
3101}
3102
3103int ASGetNumItems() {
3104 return the_scenegraph->item_objects_.size();

Callers

nothing calls this directly

Calls 6

GetCallstackMethod · 0.80
topMethod · 0.80
GetObjectFromIDMethod · 0.80
c_strMethod · 0.45
GetTypeMethod · 0.45
FormatMethod · 0.45

Tested by

no test coverage detected