Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Tue Sep 01, 2009 12:39 pm
Got a problem. My bubbles can't be prevented from moving through walls :/ Anyone can tell me what I've to do to make 'em solid? There are no contents or such for localents, bounceFactor= 0 didn't do anything, the bloodtrail isn't even moving so I can't copy that
Second thing is: can I make them disappear if they move out of the water?
[color=#FF0000]/callvote kick all_enemies[/color]
Silicone_Milk
Posts: 2237 Joined: Sat Mar 12, 2005 10:49 pm
Post
by Silicone_Milk » Tue Sep 08, 2009 7:47 pm
Like machinegun/shotgun bubbles and such?
Are you using a single brush for the water?
Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Wed Sep 09, 2009 2:45 pm
yup, those bubbles =)
and well, I don't think it'll be possible to use a single water brush in maps that are more like... complex (=
[color=#FF0000]/callvote kick all_enemies[/color]
Silicone_Milk
Posts: 2237 Joined: Sat Mar 12, 2005 10:49 pm
Post
by Silicone_Milk » Wed Sep 09, 2009 5:12 pm
I was actually going to suggest using multiple brushes if you were just using one.
The bubbles are actually hopping across several brushes?
Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Thu Sep 10, 2009 12:31 pm
Well, they got a random movement like 5*crandom() and an upwards movement like 30+5*crandom(), so yes, they could move from one brush into another.
[color=#FF0000]/callvote kick all_enemies[/color]
Silicone_Milk
Posts: 2237 Joined: Sat Mar 12, 2005 10:49 pm
Post
by Silicone_Milk » Sat Sep 12, 2009 11:32 pm
I don't remember the code at all. Do they spawn as a centity or something? I thought they were constrained to the dimensions of the liquid brush they spawned in.
Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Sun Sep 13, 2009 3:00 am
Nah, they aren't centities, they're local ents...
Code: Select all
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
le->leFlags = LEF_PUFF_DONT_SCALE;
le->leType = LE_MOVE_SCALE_FADE;
le->startTime = cg.time;
le->endTime = cg.time + 100000;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
re = &le->refEntity;
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_SPRITE;
re->rotation = 0;
re->radius = 4-(int)(3*crandom());
re->customShader = cgs.media.waterBubbleShader;
re->shaderRGBA[0] = 0xff;
re->shaderRGBA[1] = 0xff;
re->shaderRGBA[2] = 0xff;
re->shaderRGBA[3] = 0xff;
le->color[3] = 1.0;
le->pos.trType = TR_LINEAR;
le->pos.trTime = cg.time;
VectorCopy( move, le->pos.trBase );
le->pos.trDelta[0] = crandom()*5;
le->pos.trDelta[1] = crandom()*5;
le->pos.trDelta[2] = crandom()*5 + 30;
VectorAdd (move, vec, move);
and there's nothing like contentmask/ contents for localents :/
EDIT: just realized that bouncefactor and bouncesound are used with LE_FRAGMENTs only... I'll check it out.
[color=#FF0000]/callvote kick all_enemies[/color]
Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Wed Sep 16, 2009 11:02 am
Nope, been busy with school (: I'll look into it today or tomorrow.
[color=#FF0000]/callvote kick all_enemies[/color]
Rawing
Posts: 107 Joined: Tue Oct 23, 2007 1:40 pm
Post
by Rawing » Thu Sep 17, 2009 2:17 pm
Here we go.
changing the leType to LE_FRAGMENT resulted in invisible/no bubbles
It seems to need a model like the body parts when you're gibbed :/ (?)
If nothing else works, I'll try making a CG_AddBubble func, but I'm hoping I won't have to
[color=#FF0000]/callvote kick all_enemies[/color]