1 registered members (1 invisible),
672
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
ent_decal and manually setting hit struct
#470673
01/29/18 18:08
01/29/18 18:08
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Howdy, With ent_decal I want to place decals without doing a c_trace before it. According to the manual you can manually set the hit.x(yz), hit.nx(yz) and hit.model = NULL and it should work. For me it doesn't though (I don't seem them anywhere), I guess I am setting hit.nx wrongly but I am not sure. (Also if I do it with a c_trace it does work so I am setting some of the hit struct wrongly.)
hit.model = NULL;
debug_var1 = hit.x; //correct coordinates
debug_var2 = hit.y;
debug_var3 = hit.z;
vec_set(hit.nx, hit.x);
vec_normalize(hit.nx, 1);
PARTICLE* p = ent_decal(ent, _bmap, _size, _rot);
p.lifespan = _time;
Ty for taking the time!
|
|
|
Re: ent_decal and manually setting hit struct
[Re: Reconnoiter]
#470721
02/01/18 16:43
02/01/18 16:43
|
Joined: Oct 2008
Posts: 681 Germany
Ayumi
User
|
User
Joined: Oct 2008
Posts: 681
Germany
|
action SetDecal()
{
hit.model = NULL;
vec_set(hit.x, vector(-7059, 3087,595));
vec_set(hit.nx, vector(-0,-1,0));
BMAP* bmp = bmap_create("HoleGuns.dds");
PARTICLE* p = ent_decal(me, bmp, 0, hit.nx);
p.lifespan = 10000;
}
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|