[solved] Refreshing pawn graphics

Started by Joretap0, May 12, 2014, 11:12:06 AM

Previous topic - Next topic

Joretap0

Is someone know how to refresh Pawn graphics(like a simple refresh)?
That will help me a lot, cause I lost a lot of time on that without any good result.
I can change pawn apparence, but i need to save/load the game to view the difference :/

Edit :
Finally, i find a solution, but really not the best.
I create a new pawn and copy all the original pawn properties, destroy the original pawn and spawn the new one(also copy work priority).
I just hope that i don't forget anything in the copy.
But if someone as a better method, i'll take it ;)

Edit 2 :
Finally i found the good way, the one that i try first without a good result, just cause i forget something.


PawnGraphics PG = pawn.drawer.renderer.graphics;
PG.nakedGraphic = null; // <-- that's that that i'd forgive at first test
PG.ResolveGraphics();
My Mods : Dresser | Inventory Panel | Cannibal
Sorry for my english ;)