Skins?

Discuss programming in the QuakeC language.
Post Reply
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Skins?

Post by redrum »

OK, finally got those nasty little Frikbots into my QW server. :D
Now I'm trying to change their skins. I made a new player.mdl called player1.mdl. The new model has numerous skins.
Here's the code in PutClientInServer();

Code: Select all

   setmodel (self, "progs/eyes.mdl");
	modelindex_eyes = self.modelindex;
   setmodel (self, "progs/player1.mdl");
   modelindex_player = self.modelindex;

        if (self.netname == "òåäòõí")   // working, just not for bots
           self.skin = 1;

        if (self.netname == "Shadow")
           self.skin = 2;

        if (self.netname == "Godzilla")                  
           self.skin = 3;
Ok, so it works for the "human" player but not for the Frikbots. :?
I've tried putting the code in other routines all over, but still it doesn't work.

Here's the code from bot_qw.qc:

Code: Select all

void() BotFrame =
{
	local float num;
	local string h;
	
	h = infokey(world, "bot_options");
	b_options = stof(h);
	
	sv_maxspeed = cvar("sv_maxspeed");	       // for the sake of speed
	sv_gravity = cvar("sv_gravity");
	sv_friction = cvar("sv_friction");
	sv_accelerate = cvar("sv_accelerate");
	sv_stopspeed = cvar("sv_stopspeed");
	real_frametime = time - lasttime;              // in QW frametime is fuxx0red
	lasttime = time;
	
	self = nextent(world);
	num = 0;
	while (num < max_clients)
	{
		if (self.ishuman == FALSE)
		{
			if (self.b_clientno > 0)
			{
				frik_obstacles();
				CL_KeyMove();
				SV_ClientThink();
				SV_Physics_Client();

				if (self.phys_obj)
				{
					if (self.phys_obj.modelindex != self.modelindex)
					{
					   setmodel(self.phys_obj, "progs/player1.mdl");
					   self.phys_obj.modelindex = self.modelindex;                                 
					}
					self.phys_obj.frame = self.frame;
					self.phys_obj.angles = self.angles;
					self.phys_obj.colormap = self.colormap;
					self.phys_obj.effects = self.effects;
				}
			}
		}
		self = nextent(self);
		num = num + 1;
	}
};
Any ideas?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Skins?

Post by ceriux »

maybe has to do with that ? -> // working, just not for bots

why not give each bot put in a variable self.bot == x; if self.bot == x self.skin == x; just set self.bot with random(); ? that way each bot get's a random skin? rather than using netname since it doesn't seem to work with bots?
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Re: Skins?

Post by redrum »

I'll give it a go.
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Re: Skins?

Post by redrum »

nope, same thing :(
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Skins?

Post by Spike »

try using a different client (same server).
many qw clients don't do skins properly, especially player.mdl skins.
Post Reply