Hardcoded Models?

Locked
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Hardcoded Models?

Post by Silicone_Milk »

I'm wondering if somebody like Misantropia could answer this question for me:

Any idea why iD Software decided to hardcode all the model files into the game when they had other things data driven?

The only possible reason I could think of is *maybe* it makes dealing with sv_pure easier so people can't just swap models on a whim and still match the checksum of the pak.

Also, what's the deal with storing bad model load requests to prevent hitting the disk again if the player tries to load a non existant model more than once? Seems a bit over the top to me :paranoid:
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Hardcoded Models?

Post by ^misantropia^ »

Silicone_Milk wrote:Any idea why iD Software decided to hardcode all the model files into the game when they had other things data driven?
You mean the code in cgame/cg_players.c? Probably because it was easier to implement, esp. with regard to fallback (when the model couldn't be found). 'Tis only assumption but developers are lazy creatures and always under deadlines so Occam's razor likely applies here.
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: Hardcoded Models?

Post by Silicone_Milk »

That was kind of an anticlimatic response :P

I was expecting there to be some little-known C voodoo going on there.

Thanks :)
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: Hardcoded Models?

Post by jal_ »

Maybe cause of precache reasons. When a player model is not precached at loading and a new player connects using it the game freezes for a second to load the model, which is very, very unpleasant for the rest of players in the server. I don't know what code you are refering to, tho.
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: Hardcoded Models?

Post by Silicone_Milk »

The models could still be precached even if you define what models to load through an external file.

It appears iD wasn't too concerned about that though.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Hardcoded Models?

Post by ^misantropia^ »

Deferred loading? Yes, that's to avoid the hitch when a new player connects. But I thought this was about model paths being hard-coded?
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: Hardcoded Models?

Post by Silicone_Milk »

^misantropia^ wrote:Deferred loading? Yes, that's to avoid the hitch when a new player connects. But I thought this was about model paths being hard-coded?
It is about hard-coded model paths.
Locked