Raised This Month: $32 Target: $400
 8% 

SetModel/PrecacheModel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 04-21-2005 , 20:14   SetModel/PrecacheModel
Reply With Quote #1

Code:
			// Terror model selected...
			if (m_Choice == 0) {
				CBaseEntity *pPlayer = pEntity->GetUnknown()->GetBaseEntity();
				pPlayer->PrecacheModel("models/player/terror.mdl");
				pPlayer->SetModel("models/player/terror.mdl");
			}
			// T_OS model selected
			else if (m_Choice) {
				CBaseEntity *pPlayer = pEntity->GetUnknown()->GetBaseEntity();
				pPlayer->PrecacheModel("models/player/t_os.mdl");
				pPlayer->SetModel("models/player/t_os.mdl");
			}
For some reason this always crashes the server. I have this as a client command, and it should precache and set the model, but instead crashes.

Does precaching a model crash if the model is already precached, or do I need to precache the model on ServerActivate or LevelInit?
__________________
sslice is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 04-22-2005 , 17:43  
Reply With Quote #2

You need to precache the model on server activate I'm pretty sure...
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode