FG Spreadshirt Swag
  1. #1

    Join Date
    Jul 2010
    Location
    Germany, Frankfurt
    Posts
    156

    ActorManager.getActorRecordTypeFromPath return sType instead of vType

    I am just trying to understand how to use the ActorManager.
    I noticed that in the function "getActorRecordTypeFromPath" probably the correct parameter is not returned (i would expect vType instead of sType):

    Code:
    -- Internal use only
    function getActorRecordTypeFromPath(sActorNodePath)
    	if StringManager.startsWith(sActorNodePath, CombatManager.CT_MAIN_PATH .. ".") then
    		return "ct";
    	end
    
    	local sType = LibraryData.getRecordTypeFromRecordPath(sActorNodePath);
    	if _tActorRecordTypes[sType] then
    		return sType;
    	end
    
    	for sTypePath, vType in pairs(_tActorTypePathHandlers) do
    		if UtilityManager.isDataBaseNodePathMatch(sActorNodePath, sTypePath) then
    			if type(vType) == "function" then
    				return vType(sActorNodePath);
    			else
    				return sType;
    			end
    		end
    	end
    
    	return nil;
    end
    Another issue, i do not understand how this could work, is the usage of a global param "sType" which seams not to set in the manager script (in my opinion the check will allways fail ..):

    Code:
    function registerActorRecordType(sRecordType)
    	if sType == "ct" then
    		return;
    	end
    	_tActorRecordTypes[sRecordType] = true;
    end

  2. #2
    Thanks for pointing these out. I'll take a look.

    Regards,
    JPG

  3. #3
    This is addressed in the hot fix pushed today.

    Regards,
    JPG

  4. #4

    Join Date
    Jul 2010
    Location
    Germany, Frankfurt
    Posts
    156
    i just checked the hotfix, looks good

    But I noticed another "sType" condition, where I think it has no effect:

    Code:
    function registerActorTypePathHandler(sPath, v)
    	if sType == "ct" then
    		return;
    	end
    	_tActorTypePathHandlers[sPath] = v;
    end

  5. #5
    Bah, even I get caught up in copy/paste frenzy; I'll smash that on the next CoreRPG update, whenever it is.

    Thanks,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in