ensiform Posted September 19, 2007 Author Share Posted September 19, 2007 Remove the UI_CacheSaberGlowGraphics and static qhandle defines for saber shaders. As the fixme says its busted on vid_restart. Remove instances of this func and move the qhandles into cachedAssets_t and also set them in AssetCache(). Link to comment Share on other sites More sharing options...
ensiform Posted September 22, 2007 Author Share Posted September 22, 2007 Why in heck are the item bounding boxes different when dropped from normal? FinishSpawningItem: VectorSet (ent->r.mins, -8, -8, -0); VectorSet (ent->r.maxs, 8, 8, 16); LaunchItem: VectorSet (dropped->r.mins, -ITEM_RADIUS, -ITEM_RADIUS, -ITEM_RADIUS); VectorSet (dropped->r.maxs, ITEM_RADIUS, ITEM_RADIUS, ITEM_RADIUS); bg_public.h: #define ITEM_RADIUS 15 // item sizes are needed for client side pickup detection Not really sure which way people wanna have it. Link to comment Share on other sites More sharing options...
Tinny Posted September 22, 2007 Share Posted September 22, 2007 That is weird, do you know how some mods make items physics objects and allows them to be pushed/pulled around? Link to comment Share on other sites More sharing options...
ensiform Posted September 22, 2007 Author Share Posted September 22, 2007 Yes, mine does. Some mods actually create a new launched entity which is really bad, and just hide the original. I just let them move it around but store the normal position to return to. Hell, even JA+ puts the stupid hologram on (weapons and powerups) because slider doesn't know how to properly do it, really annoying too cuz you cannot then pick up dropped weapons if you already have it if it was pushed/pulled, which doesn't make any sense at all. Funny may it be, but what if i want to pull ammo from a guy i just killed towards me? Link to comment Share on other sites More sharing options...
Tinny Posted September 22, 2007 Share Posted September 22, 2007 What do you do? Have a timer on it that makes it return to a position after it hasn't been affected a while? I tried making items a physics object but for some reason they still don't move around, I tried even editing the force_throw code to allow items to be allowed to move around but no luck. Link to comment Share on other sites More sharing options...
ensiform Posted September 22, 2007 Author Share Posted September 22, 2007 } else if ( em_itemPush.integer && CheckPu****em( push_list[x] ) ) { //rolling and stationary thermal detonators are dealt with below if ( push_list[x]->item->giType == IT_TEAM ) { push_list[x]->nextthink = level.time + CTF_FLAG_RETURN_TIME; push_list[x]->think = ResetItem; // return to original spot after CTF_FLAG_RETURN_TIME ms } else { push_list[x]->nextthink = level.time + 30000; push_list[x]->think = ResetItem; // return to original spot after 30 seconds } if ( pull ) { //pull the item push_list[x]->s.pos.trType = TR_GRAVITY; push_list[x]->s.apos.trType = TR_GRAVITY; VectorScale( forward, -650.0f, push_list[x]->s.pos.trDelta ); VectorScale( forward, -650.0f, push_list[x]->s.apos.trDelta ); push_list[x]->s.pos.trTime = level.time; // move a bit on the very first frame push_list[x]->s.apos.trTime = level.time; // move a bit on the very first frame VectorCopy( push_list[x]->r.currentOrigin, push_list[x]->s.pos.trBase ); VectorCopy( push_list[x]->r.currentOrigin, push_list[x]->s.apos.trBase ); push_list[x]->physicsObject = qtrue; push_list[x]->flags |= FL_BOUNCE_HALF; } else { push_list[x]->s.pos.trType = TR_GRAVITY; push_list[x]->s.apos.trType = TR_GRAVITY; VectorScale( forward, 650.0f, push_list[x]->s.pos.trDelta ); VectorScale( forward, 650.0f, push_list[x]->s.apos.trDelta ); push_list[x]->s.pos.trTime = level.time; // move a bit on the very first frame push_list[x]->s.apos.trTime = level.time; // move a bit on the very first frame VectorCopy( push_list[x]->r.currentOrigin, push_list[x]->s.pos.trBase ); VectorCopy( push_list[x]->r.currentOrigin, push_list[x]->s.apos.trBase ); push_list[x]->physicsObject = qtrue; push_list[x]->flags |= FL_BOUNCE_HALF; } } I store the original position and such and whether it has spawned originally. CheckPu****em checks to see if the item is suspended, has a hologram below it, or is flag and check against cvar being 2 to allow dropped flags to move. Link to comment Share on other sites More sharing options...
Tinny Posted September 22, 2007 Share Posted September 22, 2007 Oh ok, thanks a ton Ensi. Link to comment Share on other sites More sharing options...
razorace Posted September 26, 2007 Share Posted September 26, 2007 Why in heck are the item bounding boxes different when dropped from normal? Not really sure which way people wanna have it. I'd use the normal bounding boxes in both cases. The dropped bbox sizes aren't what most people expect. Link to comment Share on other sites More sharing options...
ensiform Posted October 9, 2007 Author Share Posted October 9, 2007 Fixed Bug where maps that have pits but do not have "nodrop" surface down in the pit thus flags that fall/tossed/pushed/pulled down will sit there until they expire. Above G_RunItem: // double size of items static vec3_t itemMins2 = {-16, -16, 0}; static vec3_t itemMaxs2 = {16, 16, 32}; This is what I did in G_RunItem: Note, the code includes my method of item push/pull checking, and is not necessary for basejka. Below the following statement: if ( tr.fraction == 1 ) { return; } I added: if(ent->item && ((ent->flags & FL_DROPPED_ITEM) || (em_itemPush.integer && ent->think == ResetItem))) { int entityList[MAX_GENTITIES]; int i, cnt; gentity_t *other; gentity_t *t; vec3_t mins, maxs; VectorAdd(ent->r.currentOrigin, itemMins2, mins); VectorAdd(ent->r.currentOrigin, itemMaxs2, maxs); cnt = trap_EntitiesInBox(mins, maxs, entityList, MAX_GENTITIES); for( i = 0; i < cnt; i++) { other = &g_entities[entityList[i]]; if(other == ent) { continue; } if(other && other->inuse && !Q_stricmp(other->classname, "trigger_hurt")) { if(ent->item->giType == IT_TEAM) { Team_FreeEntity(ent); } else { if(ent->think == ResetItem) { ResetItem(ent); } else { G_FreeEntity(ent); } } return; } if(other && other->inuse && (!Q_stricmp(other->classname, "trigger_multiple") || !Q_stricmp(other->classname, "trigger_always") || !Q_stricmp(other->classname, "trigger_once")) && other->target && other->target[0]) { int hash = BG_StringHashValue(other->target); t = NULL; while ((t = G_FindByTargetnameFast(t, other->target, hash)) != NULL) { if(t && t->inuse && !Q_stricmp(t->classname, "target_kill")) { if(ent->item->giType == IT_TEAM) { Team_FreeEntity(ent); } else { if(ent->think == ResetItem) { ResetItem(ent); } else { G_FreeEntity(ent); } } return; } else { continue; } } } } } Link to comment Share on other sites More sharing options...
ensiform Posted October 10, 2007 Author Share Posted October 10, 2007 The infamous obtained wrong item bug is caused by an issue with the engine because events use eventParm stuff which is sent over the network in 8 bits (0-255 range) where entity numbers can be 0-1024 range (10 bits). This cannot be fixed without modifying the engine sadly. EV_ITEM_PICKUP sends the item that you picked up's entity number and can without a doubt be higher than 255. So, meh :< Edit: It may actually be doable without the engine (since this may not be the real problem as previously thought/said). I'm currently testing it with a modified version of the event with a temp entity instead. This would not work well with server-side only mods of course. I also recommend turning off cg_predictItems with this method, as server is always right. Link to comment Share on other sites More sharing options...
ensiform Posted October 26, 2007 Author Share Posted October 26, 2007 Bug in TIMER_Clear2 that doesn't clear timers on entity 0. if ( ent && ent->s.number > 0 && ent->s.number < MAX_GENTITIES ) Should be: if ( ent && ent->s.number >= 0 && ent->s.number < MAX_GENTITIES ) Link to comment Share on other sites More sharing options...
eyen Posted November 3, 2007 Share Posted November 3, 2007 Don't tell me there's more > 0 bugs ._. I might grep the source later on, unless you've already searched for them. Link to comment Share on other sites More sharing options...
ensiform Posted November 4, 2007 Author Share Posted November 4, 2007 I'm sure there are, and no I really did not. >.< Mostly in the NPC code you will find a lot of entity 0 stuff. Link to comment Share on other sites More sharing options...
ensiform Posted November 4, 2007 Author Share Posted November 4, 2007 Unique1's Holocron code that is seen in OJP has an out of bounds bug: if (number_of_holocronpositions > MAX_HOLOCRON_POSITIONS) Should be >= because array is 0...max-1 Link to comment Share on other sites More sharing options...
ensiform Posted November 6, 2007 Author Share Posted November 6, 2007 CG_PointContents should use projected origin and angles in-case water is a moving entity such as draining water from an area. contents |= trap_CM_TransformedPointContents( point, cmodel, ent->origin, ent->angles ); should be: contents |= trap_CM_TransformedPointContents( point, cmodel, cent->lerpOrigin, cent->lerpAngles ); Link to comment Share on other sites More sharing options...
LightNinja Posted November 7, 2007 Share Posted November 7, 2007 Hey ensiform, could you point me where's the code related to vehicles? I'm gonna have to take a look in order to make my dragon flyable. If you don't know where's it don't worry, its just that I've downloaded recently the SDK and I haven't looked at it yet, I've started programing in c++ in university and now I can understand things on this thread... btw good job. Link to comment Share on other sites More sharing options...
ensiform Posted November 8, 2007 Author Share Posted November 8, 2007 Well you can make vehicles without editing the SDK. I would say start by making it a flying type vehicle for now. Link to comment Share on other sites More sharing options...
ensiform Posted November 8, 2007 Author Share Posted November 8, 2007 CalcEntitySpot has a bug when SPOT_WEAPON is the spot being used... case SPOT_WEAPON: //NOTE: automatically takes leaning into account! if( ent->NPC && !VectorCompare( ent->NPC->shootAngles, vec3_origin ) && !VectorCompare( ent->NPC->shootAngles, ent->client->ps.viewangles )) { AngleVectors( ent->NPC->shootAngles, forward, right, up ); } else { AngleVectors( ent->client->ps.viewangles, forward, right, up ); } CalcMuzzlePoint( (gentity_t*)ent, forward, right, up, point ); break; But what happens when Ent is neither a player nor an NPC? Answer: AngleVectors is inputted with an invalid first param and thus causes crashing. Fix: case SPOT_WEAPON: if( ent->client ) { //NOTE: automatically takes leaning into account! if( ent->NPC && !VectorCompare( ent->NPC->shootAngles, vec3_origin ) && !VectorCompare( ent->NPC->shootAngles, ent->client->ps.viewangles )) { AngleVectors( ent->NPC->shootAngles, forward, right, up ); } else { AngleVectors( ent->client->ps.viewangles, forward, right, up ); } CalcMuzzlePoint( (gentity_t*)ent, forward, right, up, point ); } else return; break; I put the client check there because, NPC's also have a client pointer. And its not like other things are supposed to be using SPOT_WEAPON anyway... But technically you could do else if client do the ps.viewangles and else do ent->r.currentAngles. Link to comment Share on other sites More sharing options...
DarthDie Posted November 9, 2007 Share Posted November 9, 2007 That fixes seeker crashing when trying to shoot at shield(or trying todo something with shield) . Link to comment Share on other sites More sharing options...
ensiform Posted November 9, 2007 Author Share Posted November 9, 2007 Wonder why its even targeting the forcefield pickup or the forcefield it self for :S. Link to comment Share on other sites More sharing options...
ensiform Posted November 10, 2007 Author Share Posted November 10, 2007 Download percentage overflow in ui_main.c @ UI_DisplayDownloadInfo. Bug fixed In Icculus Q3: http://svn.icculus.org/quake3/trunk/code/ui/ui_main.c?r1=1161&r2=1204&p1=trunk/code/ui/ui_main.c&p2=trunk/code/ui/ui_main.c Link to comment Share on other sites More sharing options...
ensiform Posted November 11, 2007 Author Share Posted November 11, 2007 2 hand lightning effect origin should probably be in middle, not coming from left hand only... cg_players.c CG_Player: The following gets changed: //trap_G2API_GetBoltMatrix(cent->ghoul2, 0, ci->bolt_lhand, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); if (!gotLHandMatrix) { trap_G2API_GetBoltMatrix(cent->ghoul2, 0, ci->bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); gotLHandMatrix = qtrue; } efOrg[0] = lHandMatrix.matrix[0][3]; efOrg[1] = lHandMatrix.matrix[1][3]; efOrg[2] = lHandMatrix.matrix[2][3]; to: if ( cent->currentState.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING_HOLD ) {//find mid point between two bolts mdxaBone_t rHandMatrix; trap_G2API_GetBoltMatrix(cent->ghoul2, 0, ci->bolt_rhand, &rHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); if (!gotLHandMatrix) { trap_G2API_GetBoltMatrix(cent->ghoul2, 0, ci->bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); gotLHandMatrix = qtrue; } efOrg[0] = ((lHandMatrix.matrix[0][3] + rHandMatrix.matrix[0][3]) * 0.5f); efOrg[1] = ((lHandMatrix.matrix[1][3] + rHandMatrix.matrix[1][3]) * 0.5f); efOrg[2] = ((lHandMatrix.matrix[2][3] + rHandMatrix.matrix[2][3]) * 0.5f); } else { if (!gotLHandMatrix) { trap_G2API_GetBoltMatrix(cent->ghoul2, 0, ci->bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale); gotLHandMatrix = qtrue; } efOrg[0] = lHandMatrix.matrix[0][3]; efOrg[1] = lHandMatrix.matrix[1][3]; efOrg[2] = lHandMatrix.matrix[2][3]; } Alternatively, you could do it like Single Player and play the effect from both hands. (Though is extra things being drawn). So I compensated for this because, it looked as though and the code said that it was only coming from left, and being in center looks a little bit better. Link to comment Share on other sites More sharing options...
ensiform Posted December 22, 2007 Author Share Posted December 22, 2007 Force Dodge shouldn't work while holding a rocket lock. Jedi_DodgeEvasion: if ( self->client->ps.weaponTime > 0 || self->client->ps.forceHandExtend != HANDEXTEND_NONE ) {//in some effect that stops me from moving on my own return qfalse; } => if ( self->client->ps.weaponTime > 0 || self->client->ps.forceHandExtend != HANDEXTEND_NONE || self->client->ps.rocketLockTime > 0 ) {//in some effect that stops me from moving on my own return qfalse; } Link to comment Share on other sites More sharing options...
ensiform Posted January 23, 2008 Author Share Posted January 23, 2008 cg.snap->ps.fd.forcePowerLevel[] does not contain real data for most powers. As far as I can tell its only FP_LEVITATION (1) and FP_SEE (14) Link to comment Share on other sites More sharing options...
razorace Posted January 23, 2008 Share Posted January 23, 2008 does that cause problems with the client side prediction? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.