Hello,
I'm modifying the source code of CAR.C in order to automatically load a SHADOW model (MDL) during the wheel loading process (see function "car_wheelcreate()" for more info).

Now I need to refer to an entity with the same name of the wheel, but with the postfix "_shadow". For example, if the car is called FORMULA1.mdl, then the wheel will be FORMULA1_wheel.mdl (it already works in this way). Shadow model for the wheel should be:

FORMULA1_wheel_shadow.mdl

My problem is I cannot load and refer to it at runtime.
For the car body I use a global ENTITY:

Code:
ENTITY* carShadow = {type = "buggy_shadow.MDL"; flags = SHOW; }



But I cannot use the same way for the wheel, since in the function I don't know how that model will be called.
So I tried this code:

Code:
ENTITY* wheelShadow = ent_create(wheel_shadow_name, offset, NULL);
wheel.shadow = wheelShadow;



Where wheelShadow is the entity used to manage the MDL model, and wheel_shadow_name is the full name of the MDL model self.
My problem is the created entity always appear in the screen!
Furthermore, even if I don't get any error, it seems it does not work.

Can you help me please?

Thank you!