From 6ef9835f356ddd49c1ac4384f6805108d9e9770c Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Fri, 19 Sep 2003 21:25:10 +0000 Subject: [PATCH] Flares (again!). Doors that open away from players. --- reaction/game/g_local.h | 4 + reaction/game/g_misc.c | 4 + reaction/game/g_mover.c | 77 ++++++----- reaction/game/g_utils.c | 269 ++++++++++++++++++++++++++++++++++++++- reaction/game/g_weapon.c | 24 ++-- reaction/game/game.plg | 178 +++++++++++++------------- 6 files changed, 413 insertions(+), 143 deletions(-) diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 76f9a34d..79244db1 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.149 2003/09/19 21:25:10 makro +// Flares (again!). Doors that open away from players. +// // Revision 1.148 2003/09/18 23:28:44 jbravo // Adding G_acos() // @@ -442,6 +445,7 @@ typedef enum { #define RQ3_CTF_RESPAWNTIME_DEFAULT 10000 // JBravo: time for weapons to respawn - up to 10s #define SP_AUTOOPEN 4 // Elder: revert to Q3 behaviour #define SP_DOORTOGGLE 8 // Elder: added to enable mover toggling +#define SP_OPENAWAY 64 //Makro - door will always open away from the player #define MAXDOORTIME 100 // Elder: max time the opendoor key can stay open //Makro - moved weapon/item banning flags to bg_public.h so that the UI diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 9847e1cb..5664e43c 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.81 2003/09/19 21:25:10 makro +// Flares (again!). Doors that open away from players. +// // Revision 1.80 2003/09/19 00:53:14 makro // Flares again // @@ -494,6 +497,7 @@ void SP_misc_lens_flare(gentity_t *ent) G_SpawnInt("sunsize", "0", &ent->mass); G_SpawnFloat("sunalpha", "0.5", &ent->speed); + //this is so we can use the same values from if (!ent->target) { if (!G_SpawnVector("direction", "0 0 1", ent->s.origin2)) { AngleVectors(ent->s.angles, ent->s.origin2, NULL, NULL); diff --git a/reaction/game/g_mover.c b/reaction/game/g_mover.c index 792c5359..55734730 100644 --- a/reaction/game/g_mover.c +++ b/reaction/game/g_mover.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.70 2003/09/19 21:25:10 makro +// Flares (again!). Doors that open away from players. +// // Revision 1.69 2003/09/18 23:28:44 jbravo // Adding G_acos() // @@ -897,34 +900,40 @@ Added by Makro */ void AdjustDoorDir(gentity_t *ent, gentity_t *activator) { - float angle, ld, lp; - vec3_t door, player, cross; - if (!ent || !activator || !activator->client) - return; - if (Q_stricmp(ent->classname, "func_door_rotating")) + float cross; + vec3_t door, player; + int x = 0, y = 1; + gentity_t *slave; + + if (!activator || !activator->client) return; if (ent->moverState != ROTATOR_POS1) return; - VectorAdd(ent->r.mins, ent->r.maxs, door); - VectorScale(door, 0.5f, door); - VectorSubtract(activator->r.currentOrigin, door, player); - VectorSubtract(ent->r.currentOrigin, door, door); - - - door[2] = player[2] = 0; - - CrossProduct(door, player, cross); - - if ( !(ld = VectorLength(door)) || !(lp = VectorLength(player)) ) - return; - angle = G_acos(DotProduct(door, player) / (ld * lp)); - - if (cross[2] * ent->distance > 0) - G_Printf("Door: no need to reverse\n"); - else - G_Printf("Door: need to reverse\n"); - + for (slave = ent; slave; slave = slave->teamchain) + { + VectorAdd(slave->r.absmin, slave->r.absmax, door); + VectorScale(door, 0.5f, door); + VectorSubtract(activator->r.currentOrigin, door, player); + VectorSubtract(slave->r.currentOrigin, door, door); + + //X axis ? swap X and Z then + if (slave->spawnflags & 16) + x = 2; + //Y axis ? + else if (slave->spawnflags & 32) + y = 2; + + cross = door[x] * player[y] - door[y] * player[x]; + + if (cross * slave->distance < 0) + { + VectorNegate(slave->pos2, door); + VectorMA(door, 2.0f, slave->pos1, slave->pos2); + VectorNegate(slave->movedir, slave->movedir); + slave->distance *= -1; + } + } } /* @@ -937,13 +946,7 @@ void Use_BinaryMover(gentity_t * ent, gentity_t * other, gentity_t * activator) { int total; int partial; - vec3_t dist; - float d; - //Makro - temp!!! - //AdjustDoorDir(ent, activator); - - // only the master should be used if (ent->flags & FL_TEAMSLAVE) { Use_BinaryMover(ent->teammaster, other, activator); @@ -961,18 +964,12 @@ void Use_BinaryMover(gentity_t * ent, gentity_t * other, gentity_t * activator) return; } - if (activator) - { - //Makro - check if we're too far away - VectorSubtract(ent->r.currentOrigin, activator->r.currentOrigin, dist); - d = VectorLength(dist); - //not for doors with health - if (!ent->takedamage && ent->mass && (d > ent->mass) ) - return; - } - ent->activator = activator; + //Makro - reverse if needed + if ( (ent->spawnflags & SP_OPENAWAY) && !Q_stricmp(ent->classname, "func_door_rotating") ) + AdjustDoorDir(ent, activator); + if (ent->moverState == MOVER_POS1) { // start moving 50 msec later, becase if this was player // triggered, level.time hasn't been advanced yet diff --git a/reaction/game/g_utils.c b/reaction/game/g_utils.c index 2fe6f24d..0eb5520a 100644 --- a/reaction/game/g_utils.c +++ b/reaction/game/g_utils.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.24 2003/09/19 21:25:10 makro +// Flares (again!). Doors that open away from players. +// // Revision 1.23 2003/09/18 23:28:44 jbravo // Adding G_acos() // @@ -879,6 +882,8 @@ void SanitizeString(char *in, char *out) *out = 0; } +//Makro - old table +/* float G_acostable[] = { 3.14159265, 3.07908248, 3.05317551, 3.03328655, 3.01651113, 3.00172442, 2.98834964, 2.97604422, 2.96458497, 2.95381690, 2.94362719, 2.93393068, 2.92466119, 2.91576615, 2.90720289, 2.89893629, @@ -1007,9 +1012,269 @@ float G_acostable[] = { 0.35542120, 0.34976542, 0.34402054, 0.33818204, 0.33224495, 0.32620390, 0.32005298, 0.31378574, 0.30739505, 0.30087304, 0.29421096, 0.28739907, 0.28042645, 0.27328078, 0.26594810, 0.25841250, 0.25065566, 0.24265636, 0.23438976, 0.22582651, 0.21693146, 0.20766198, 0.19796546, 0.18777575, - 0.17700769, 0.16554844, 0.15324301, 0.13986823, 0.12508152, 0.10830610, 0.08841715, 0.06251018, }; + 0.17700769, 0.16554844, 0.15324301, 0.13986823, 0.12508152, 0.10830610, 0.08841715, 0.06251018, +}; +*/ +float G_acostable[] = +{ + 3.1415927410125732f, 3.0790824890136719f, 3.0531754493713379f, 3.0332865715026855f, + 3.0165112018585205f, 3.0017244815826416f, 2.9883496761322021f, 2.9760441780090332f, + 2.9645850658416748f, 2.9538168907165527f, 2.9436271190643311f, 2.9339306354522705f, + 2.9246611595153809f, 2.9157662391662598f, 2.9072029590606689f, 2.8989362716674805f, + 2.8909370899200439f, 2.8831801414489746f, 2.8756444454193115f, 2.8683118820190430f, + 2.8611662387847900f, 2.8541936874389648f, 2.8473815917968750f, 2.8407196998596191f, + 2.8341975212097168f, 2.8278069496154785f, 2.8215396404266357f, 2.8153886795043945f, + 2.8093476295471191f, 2.8034105300903320f, 2.7975721359252930f, 2.7918272018432617f, + 2.7861714363098145f, 2.7806005477905273f, 2.7751107215881348f, 2.7696981430053711f, + 2.7643599510192871f, 2.7590925693511963f, 2.7538931369781494f, 2.7487592697143555f, + 2.7436881065368652f, 2.7386775016784668f, 2.7337250709533691f, 2.7288289070129395f, + 2.7239866256713867f, 2.7191967964172363f, 2.7144575119018555f, 2.7097668647766113f, + 2.7051236629486084f, 2.7005262374877930f, 2.6959729194641113f, 2.6914627552032471f, + 2.6869943141937256f, 2.6825664043426514f, 2.6781778335571289f, 2.6738274097442627f, + 2.6695141792297363f, 2.6652369499206543f, 2.6609950065612793f, 2.6567871570587158f, + 2.6526126861572266f, 2.6484708786010742f, 2.6443605422973633f, 2.6402814388275146f, + 2.6362321376800537f, 2.6322124004364014f, 2.6282212734222412f, 2.6242582798004150f, + 2.6203227043151855f, 2.6164140701293945f, 2.6125314235687256f, 2.6086742877960205f, + 2.6048424243927002f, 2.6010351181030273f, 2.5972516536712646f, 2.5934917926788330f, + 2.5897548198699951f, 2.5860404968261719f, 2.5823483467102051f, 2.5786776542663574f, + 2.5750284194946289f, 2.5713996887207031f, 2.5677917003631592f, 2.5642035007476807f, + 2.5606350898742676f, 2.5570859909057617f, 2.5535557270050049f, 2.5500440597534180f, + 2.5465507507324219f, 2.5430753231048584f, 2.5396175384521484f, 2.5361769199371338f, + 2.5327534675598145f, 2.5293467044830322f, 2.5259563922882080f, 2.5225822925567627f, + 2.5192241668701172f, 2.5158815383911133f, 2.5125544071197510f, 2.5092422962188721f, + 2.5059452056884766f, 2.5026628971099854f, 2.4993946552276611f, 2.4961409568786621f, + 2.4929010868072510f, 2.4896750450134277f, 2.4864625930786133f, 2.4832637310028076f, + 2.4800777435302734f, 2.4769048690795898f, 2.4737446308135986f, 2.4705972671508789f, + 2.4674620628356934f, 2.4643392562866211f, 2.4612286090850830f, 2.4581298828125000f, + 2.4550426006317139f, 2.4519672393798828f, 2.4489030838012695f, 2.4458503723144531f, + 2.4428086280822754f, 2.4397778511047363f, 2.4367580413818359f, 2.4337489604949951f, + 2.4307501316070557f, 2.4277620315551758f, 2.4247839450836182f, 2.4218161106109619f, + 2.4188582897186279f, 2.4159104824066162f, 2.4129722118377686f, 2.4100437164306641f, + 2.4071247577667236f, 2.4042150974273682f, 2.4013149738311768f, 2.3984236717224121f, + 2.3955416679382324f, 2.3926687240600586f, 2.3898043632507324f, 2.3869488239288330f, + 2.3841021060943604f, 2.3812637329101562f, 2.3784339427947998f, 2.3756122589111328f, + 2.3727991580963135f, 2.3699939250946045f, 2.3671970367431641f, 2.3644080162048340f, + 2.3616266250610352f, 2.3588533401489258f, 2.3560876846313477f, 2.3533296585083008f, + 2.3505790233612061f, 2.3478360176086426f, 2.3451004028320312f, 2.3423721790313721f, + 2.3396508693695068f, 2.3369369506835937f, 2.3342299461364746f, 2.3315300941467285f, + 2.3288371562957764f, 2.3261508941650391f, 2.3234715461730957f, 2.3207988739013672f, + 2.3181328773498535f, 2.3154733180999756f, 2.3128204345703125f, 2.3101739883422852f, + 2.3075337409973145f, 2.3048999309539795f, 2.3022723197937012f, 2.2996509075164795f, + 2.2970354557037354f, 2.2944264411926270f, 2.2918231487274170f, 2.2892258167266846f, + 2.2866344451904297f, 2.2840487957000732f, 2.2814691066741943f, 2.2788949012756348f, + 2.2763264179229736f, 2.2737636566162109f, 2.2712063789367676f, 2.2686545848846436f, + 2.2661082744598389f, 2.2635674476623535f, 2.2610318660736084f, 2.2585015296936035f, + 2.2559764385223389f, 2.2534565925598145f, 2.2509419918060303f, 2.2484323978424072f, + 2.2459278106689453f, 2.2434284687042236f, 2.2409338951110840f, 2.2384440898895264f, + 2.2359595298767090f, 2.2334794998168945f, 2.2310044765472412f, 2.2285339832305908f, + 2.2260684967041016f, 2.2236073017120361f, 2.2211511135101318f, 2.2186992168426514f, + 2.2162520885467529f, 2.2138092517852783f, 2.2113709449768066f, 2.2089371681213379f, + 2.2065076828002930f, 2.2040824890136719f, 2.2016615867614746f, 2.1992452144622803f, + 2.1968328952789307f, 2.1944246292114258f, 2.1920206546783447f, 2.1896209716796875f, + 2.1872251033782959f, 2.1848335266113281f, 2.1824460029602051f, 2.1800622940063477f, + 2.1776826381683350f, 2.1753067970275879f, 2.1729350090026855f, 2.1705670356750488f, + 2.1682026386260986f, 2.1658422946929932f, 2.1634857654571533f, 2.1611328125000000f, + 2.1587836742401123f, 2.1564381122589111f, 2.1540963649749756f, 2.1517579555511475f, + 2.1494233608245850f, 2.1470923423767090f, 2.1447646617889404f, 2.1424405574798584f, + 2.1401200294494629f, 2.1378028392791748f, 2.1354889869689941f, 2.1331787109375000f, + 2.1308715343475342f, 2.1285679340362549f, 2.1262676715850830f, 2.1239705085754395f, + 2.1216766834259033f, 2.1193859577178955f, 2.1170985698699951f, 2.1148142814636230f, + 2.1125333309173584f, 2.1102552413940430f, 2.1079804897308350f, 2.1057085990905762f, + 2.1034400463104248f, 2.1011743545532227f, 2.0989115238189697f, 2.0966517925262451f, + 2.0943951606750488f, 2.0921413898468018f, 2.0898904800415039f, 2.0876424312591553f, + 2.0853972434997559f, 2.0831549167633057f, 2.0809154510498047f, 2.0786788463592529f, + 2.0764448642730713f, 2.0742137432098389f, 2.0719854831695557f, 2.0697598457336426f, + 2.0675368309020996f, 2.0653164386749268f, 2.0630989074707031f, 2.0608837604522705f, + 2.0586714744567871f, 2.0564615726470947f, 2.0542545318603516f, 2.0520498752593994f, + 2.0498476028442383f, 2.0476479530334473f, 2.0454509258270264f, 2.0432562828063965f, + 2.0410640239715576f, 2.0388743877410889f, 2.0366871356964111f, 2.0345020294189453f, + 2.0323195457458496f, 2.0301394462585449f, 2.0279614925384521f, 2.0257861614227295f, + 2.0236129760742187f, 2.0214419364929199f, 2.0192735195159912f, 2.0171070098876953f, + 2.0149428844451904f, 2.0127811431884766f, 2.0106215476989746f, 2.0084640979766846f, + 2.0063087940216064f, 2.0041556358337402f, 2.0020046234130859f, 1.9998557567596436f, + 1.9977089166641235f, 1.9955643415451050f, 1.9934216737747192f, 1.9912811517715454f, + 1.9891426563262939f, 1.9870063066482544f, 1.9848718643188477f, 1.9827394485473633f, + 1.9806089401245117f, 1.9784804582595825f, 1.9763540029525757f, 1.9742294549942017f, + 1.9721068143844604f, 1.9699860811233521f, 1.9678671360015869f, 1.9657502174377441f, + 1.9636350870132446f, 1.9615218639373779f, 1.9594104290008545f, 1.9573009014129639f, + 1.9551930427551270f, 1.9530870914459229f, 1.9509829282760620f, 1.9488805532455444f, + 1.9467798471450806f, 1.9446809291839600f, 1.9425836801528931f, 1.9404882192611694f, + 1.9383944272994995f, 1.9363023042678833f, 1.9342118501663208f, 1.9321230649948120f, + 1.9300359487533569f, 1.9279505014419556f, 1.9258666038513184f, 1.9237843751907349f, + 1.9217036962509155f, 1.9196245670318604f, 1.9175471067428589f, 1.9154710769653320f, + 1.9133967161178589f, 1.9113239049911499f, 1.9092525243759155f, 1.9071826934814453f, + 1.9051142930984497f, 1.9030474424362183f, 1.9009820222854614f, 1.8989181518554688f, + 1.8968557119369507f, 1.8947945833206177f, 1.8927350044250488f, 1.8906768560409546f, + 1.8886200189590454f, 1.8865646123886108f, 1.8845106363296509f, 1.8824579715728760f, + 1.8804066181182861f, 1.8783566951751709f, 1.8763080835342407f, 1.8742607831954956f, + 1.8722147941589355f, 1.8701701164245605f, 1.8681266307830811f, 1.8660845756530762f, + 1.8640437126159668f, 1.8620041608810425f, 1.8599658012390137f, 1.8579286336898804f, + 1.8558927774429321f, 1.8538581132888794f, 1.8518246412277222f, 1.8497923612594604f, + 1.8477612733840942f, 1.8457313776016235f, 1.8437025547027588f, 1.8416749238967896f, + 1.8396484851837158f, 1.8376231193542480f, 1.8355989456176758f, 1.8335758447647095f, + 1.8315538167953491f, 1.8295328617095947f, 1.8275130987167358f, 1.8254942893981934f, + 1.8234765529632568f, 1.8214598894119263f, 1.8194442987442017f, 1.8174297809600830f, + 1.8154162168502808f, 1.8134036064147949f, 1.8113920688629150f, 1.8093814849853516f, + 1.8073719739913940f, 1.8053632974624634f, 1.8033556938171387f, 1.8013490438461304f, + 1.7993432283401489f, 1.7973384857177734f, 1.7953345775604248f, 1.7933316230773926f, + 1.7913296222686768f, 1.7893284559249878f, 1.7873281240463257f, 1.7853287458419800f, + 1.7833303213119507f, 1.7813326120376587f, 1.7793358564376831f, 1.7773398160934448f, + 1.7753447294235229f, 1.7733504772186279f, 1.7713569402694702f, 1.7693642377853394f, + 1.7673723697662354f, 1.7653813362121582f, 1.7633910179138184f, 1.7614015340805054f, + 1.7594127655029297f, 1.7574247121810913f, 1.7554373741149902f, 1.7534508705139160f, + 1.7514650821685791f, 1.7494800090789795f, 1.7474956512451172f, 1.7455120086669922f, + 1.7435289621353149f, 1.7415467500686646f, 1.7395651340484619f, 1.7375841140747070f, + 1.7356039285659790f, 1.7336242198944092f, 1.7316452264785767f, 1.7296669483184814f, + 1.7276891469955444f, 1.7257120609283447f, 1.7237355709075928f, 1.7217596769332886f, + 1.7197843790054321f, 1.7178096771240234f, 1.7158355712890625f, 1.7138619422912598f, + 1.7118890285491943f, 1.7099165916442871f, 1.7079446315765381f, 1.7059732675552368f, + 1.7040023803710937f, 1.7020320892333984f, 1.7000622749328613f, 1.6980929374694824f, + 1.6961241960525513f, 1.6941558122634888f, 1.6921880245208740f, 1.6902205944061279f, + 1.6882537603378296f, 1.6862872838973999f, 1.6843212842941284f, 1.6823557615280151f, + 1.6803905963897705f, 1.6784259080886841f, 1.6764615774154663f, 1.6744977235794067f, + 1.6725342273712158f, 1.6705712080001831f, 1.6686084270477295f, 1.6666461229324341f, + 1.6646841764450073f, 1.6627225875854492f, 1.6607613563537598f, 1.6588004827499390f, + 1.6568399667739868f, 1.6548796892166138f, 1.6529198884963989f, 1.6509603261947632f, + 1.6490010023117065f, 1.6470420360565186f, 1.6450834274291992f, 1.6431250572204590f, + 1.6411669254302979f, 1.6392090320587158f, 1.6372514963150024f, 1.6352941989898682f, + 1.6333371400833130f, 1.6313802003860474f, 1.6294236183166504f, 1.6274672746658325f, + 1.6255111694335937f, 1.6235551834106445f, 1.6215994358062744f, 1.6196439266204834f, + 1.6176885366439819f, 1.6157332658767700f, 1.6137783527374268f, 1.6118234395980835f, + 1.6098687648773193f, 1.6079142093658447f, 1.6059597730636597f, 1.6040055751800537f, + 1.6020513772964478f, 1.6000974178314209f, 1.5981434583663940f, 1.5961897373199463f, + 1.5942360162734985f, 1.5922824144363403f, 1.5903288125991821f, 1.5883753299713135f, + 1.5864219665527344f, 1.5844686031341553f, 1.5825153589248657f, 1.5805621147155762f, + 1.5786088705062866f, 1.5766557455062866f, 1.5747026205062866f, 1.5727494955062866f, + 1.5707963705062866f, 1.5688432455062866f, 1.5668901205062866f, 1.5649368762969971f, + 1.5629837512969971f, 1.5610305070877075f, 1.5590772628784180f, 1.5571240186691284f, + 1.5551706552505493f, 1.5532172918319702f, 1.5512638092041016f, 1.5493103265762329f, + 1.5473567247390747f, 1.5454030036926270f, 1.5434491634368896f, 1.5414952039718628f, + 1.5395412445068359f, 1.5375870466232300f, 1.5356328487396240f, 1.5336784124374390f, + 1.5317238569259644f, 1.5297691822052002f, 1.5278143882751465f, 1.5258593559265137f, + 1.5239040851593018f, 1.5219488143920898f, 1.5199931859970093f, 1.5180374383926392f, + 1.5160815715789795f, 1.5141253471374512f, 1.5121690034866333f, 1.5102124214172363f, + 1.5082556009292603f, 1.5062985420227051f, 1.5043411254882812f, 1.5023835897445679f, + 1.5004258155822754f, 1.4984676837921143f, 1.4965093135833740f, 1.4945505857467651f, + 1.4925916194915771f, 1.4906324148178101f, 1.4886728525161743f, 1.4867129325866699f, + 1.4847526550292969f, 1.4827921390533447f, 1.4808312654495239f, 1.4788700342178345f, + 1.4769084453582764f, 1.4749464988708496f, 1.4729841947555542f, 1.4710215330123901f, + 1.4690583944320679f, 1.4670948982238770f, 1.4651310443878174f, 1.4631667137145996f, + 1.4612020254135132f, 1.4592369794845581f, 1.4572713375091553f, 1.4553053379058838f, + 1.4533389806747437f, 1.4513720273971558f, 1.4494047164916992f, 1.4474368095397949f, + 1.4454685449600220f, 1.4434996843338013f, 1.4415303468704224f, 1.4395605325698853f, + 1.4375902414321899f, 1.4356193542480469f, 1.4336479902267456f, 1.4316761493682861f, + 1.4297037124633789f, 1.4277306795120239f, 1.4257570505142212f, 1.4237829446792603f, + 1.4218082427978516f, 1.4198329448699951f, 1.4178570508956909f, 1.4158805608749390f, + 1.4139034748077393f, 1.4119256734848022f, 1.4099473953247070f, 1.4079684019088745f, + 1.4059888124465942f, 1.4040085077285767f, 1.4020274877548218f, 1.4000459909439087f, + 1.3980636596679687f, 1.3960807323455811f, 1.3940969705581665f, 1.3921126127243042f, + 1.3901275396347046f, 1.3881417512893677f, 1.3861552476882935f, 1.3841679096221924f, + 1.3821799755096436f, 1.3801912069320679f, 1.3782016038894653f, 1.3762112855911255f, + 1.3742202520370483f, 1.3722283840179443f, 1.3702356815338135f, 1.3682422637939453f, + 1.3662478923797607f, 1.3642528057098389f, 1.3622568845748901f, 1.3602600097656250f, + 1.3582624197006226f, 1.3562638759613037f, 1.3542644977569580f, 1.3522641658782959f, + 1.3502631187438965f, 1.3482609987258911f, 1.3462580442428589f, 1.3442541360855103f, + 1.3422493934631348f, 1.3402435779571533f, 1.3382369279861450f, 1.3362293243408203f, + 1.3342207670211792f, 1.3322111368179321f, 1.3302005529403687f, 1.3281890153884888f, + 1.3261765241622925f, 1.3241629600524902f, 1.3221483230590820f, 1.3201327323913574f, + 1.3181160688400269f, 1.3160983324050903f, 1.3140796422958374f, 1.3120597600936890f, + 1.3100388050079346f, 1.3080168962478638f, 1.3059936761856079f, 1.3039695024490356f, + 1.3019441366195679f, 1.2999176979064941f, 1.2978900671005249f, 1.2958613634109497f, + 1.2938313484191895f, 1.2918002605438232f, 1.2897679805755615f, 1.2877345085144043f, + 1.2856998443603516f, 1.2836639881134033f, 1.2816269397735596f, 1.2795885801315308f, + 1.2775489091873169f, 1.2755080461502075f, 1.2734659910202026f, 1.2714226245880127f, + 1.2693778276443481f, 1.2673318386077881f, 1.2652845382690430f, 1.2632359266281128f, + 1.2611860036849976f, 1.2591347694396973f, 1.2570821046829224f, 1.2550280094146729f, + 1.2529726028442383f, 1.2509158849716187f, 1.2488576173782349f, 1.2467980384826660f, + 1.2447370290756226f, 1.2426744699478149f, 1.2406105995178223f, 1.2385451793670654f, + 1.2364783287048340f, 1.2344100475311279f, 1.2323400974273682f, 1.2302688360214233f, + 1.2281959056854248f, 1.2261215448379517f, 1.2240455150604248f, 1.2219680547714233f, + 1.2198889255523682f, 1.2178083658218384f, 1.2157260179519653f, 1.2136422395706177f, + 1.2115566730499268f, 1.2094695568084717f, 1.2073807716369629f, 1.2052903175354004f, + 1.2031983137130737f, 1.2011045217514038f, 1.1990089416503906f, 1.1969118118286133f, + 1.1948127746582031f, 1.1927121877670288f, 1.1906096935272217f, 1.1885055303573608f, + 1.1863995790481567f, 1.1842917203903198f, 1.1821821928024292f, 1.1800707578659058f, + 1.1779575347900391f, 1.1758424043655396f, 1.1737254858016968f, 1.1716066598892212f, + 1.1694859266281128f, 1.1673632860183716f, 1.1652386188507080f, 1.1631121635437012f, + 1.1609836816787720f, 1.1588532924652100f, 1.1567207574844360f, 1.1545864343643188f, + 1.1524499654769897f, 1.1503114700317383f, 1.1481709480285645f, 1.1460283994674683f, + 1.1438837051391602f, 1.1417369842529297f, 1.1395881175994873f, 1.1374371051788330f, + 1.1352839469909668f, 1.1331286430358887f, 1.1309711933135986f, 1.1288114786148071f, + 1.1266496181488037f, 1.1244856119155884f, 1.1223192214965820f, 1.1201505661010742f, + 1.1179797649383545f, 1.1158065795898437f, 1.1136310100555420f, 1.1114532947540283f, + 1.1092730760574341f, 1.1070905923843384f, 1.1049056053161621f, 1.1027183532714844f, + 1.1005285978317261f, 1.0983363389968872f, 1.0961416959762573f, 1.0939446687698364f, + 1.0917450189590454f, 1.0895428657531738f, 1.0873382091522217f, 1.0851309299468994f, + 1.0829211473464966f, 1.0807087421417236f, 1.0784938335418701f, 1.0762761831283569f, + 1.0740557909011841f, 1.0718328952789307f, 1.0696072578430176f, 1.0673788785934448f, + 1.0651477575302124f, 1.0629137754440308f, 1.0606771707534790f, 1.0584377050399780f, + 1.0561953783035278f, 1.0539503097534180f, 1.0517022609710693f, 1.0494513511657715f, + 1.0471975803375244f, 1.0449408292770386f, 1.0426810979843140f, 1.0404183864593506f, + 1.0381526947021484f, 1.0358840227127075f, 1.0336122512817383f, 1.0313373804092407f, + 1.0290594100952148f, 1.0267783403396606f, 1.0244940519332886f, 1.0222066640853882f, + 1.0199160575866699f, 1.0176222324371338f, 1.0153250694274902f, 1.0130246877670288f, + 1.0107209682464600f, 1.0084140300750732f, 1.0061036348342896f, 1.0037899017333984f, + 1.0014727115631104f, 0.9991520643234253f, 0.9968279600143433f, 0.9945003986358643f, + 0.9921692609786987f, 0.9898346066474915f, 0.9874963760375977f, 0.9851545095443726f, + 0.9828090071678162f, 0.9804598093032837f, 0.9781069159507752f, 0.9757502675056458f, + 0.9733899235725403f, 0.9710257053375244f, 0.9686577320098877f, 0.9662858247756958f, + 0.9639101028442383f, 0.9615303874015808f, 0.9591467380523682f, 0.9567590951919556f, + 0.9543674588203430f, 0.9519717097282410f, 0.9495719075202942f, 0.9471679925918579f, + 0.9447598457336426f, 0.9423475265502930f, 0.9399309754371643f, 0.9375101923942566f, + 0.9350850582122803f, 0.9326555728912354f, 0.9302216768264771f, 0.9277834296226502f, + 0.9253406524658203f, 0.9228934049606323f, 0.9204416275024414f, 0.9179852604866028f, + 0.9155242443084717f, 0.9130585789680481f, 0.9105882048606873f, 0.9081131219863892f, + 0.9056332111358643f, 0.9031484723091126f, 0.9006588459014893f, 0.8981642723083496f, + 0.8956648111343384f, 0.8931602835655212f, 0.8906506896018982f, 0.8881360292434692f, + 0.8856161832809448f, 0.8830911517143250f, 0.8805608749389648f, 0.8780252933502197f, + 0.8754844069480896f, 0.8729380369186401f, 0.8703863024711609f, 0.8678290247917175f, + 0.8652662038803101f, 0.8626977801322937f, 0.8601236343383789f, 0.8575438261032105f, + 0.8549582958221436f, 0.8523668646812439f, 0.8497695922851563f, 0.8471662998199463f, + 0.8445571064949036f, 0.8419417738914490f, 0.8393203616142273f, 0.8366927504539490f, + 0.8340589404106140f, 0.8314187526702881f, 0.8287722468376160f, 0.8261193037033081f, + 0.8234598040580750f, 0.8207938075065613f, 0.8181210756301880f, 0.8154417276382446f, + 0.8127555847167969f, 0.8100625276565552f, 0.8073626160621643f, 0.8046557307243347f, + 0.8019416928291321f, 0.7992205619812012f, 0.7964922189712524f, 0.7937565445899963f, + 0.7910135388374329f, 0.7882630228996277f, 0.7855049967765808f, 0.7827392816543579f, + 0.7799659371376038f, 0.7771847248077393f, 0.7743957042694092f, 0.7715986371040344f, + 0.7687935233116150f, 0.7659803032875061f, 0.7631587982177734f, 0.7603288888931274f, + 0.7574906349182129f, 0.7546437382698059f, 0.7517882585525513f, 0.7489240169525147f, + 0.7460508942604065f, 0.7431688904762268f, 0.7402777671813965f, 0.7373774647712708f, + 0.7344678640365601f, 0.7315488457679749f, 0.7286203503608704f, 0.7256821990013123f, + 0.7227342724800110f, 0.7197764515876770f, 0.7168086171150208f, 0.7138306498527527f, + 0.7108424305915833f, 0.7078437805175781f, 0.7048345804214478f, 0.7018147110939026f, + 0.6987839937210083f, 0.6957423090934753f, 0.6926895380020142f, 0.6896254420280457f, + 0.6865499615669251f, 0.6834628582000732f, 0.6803640723228455f, 0.6772533059120178f, + 0.6741304993629456f, 0.6709954142570496f, 0.6678479313850403f, 0.6646878123283386f, + 0.6615149378776550f, 0.6583290100097656f, 0.6551299691200256f, 0.6519175171852112f, + 0.6486915349960327f, 0.6454517245292664f, 0.6421979069709778f, 0.6389298439025879f, + 0.6356474161148071f, 0.6323502659797669f, 0.6290382146835327f, 0.6257110834121704f, + 0.6223685145378113f, 0.6190102696418762f, 0.6156361699104309f, 0.6122458577156067f, + 0.6088390946388245f, 0.6054156422615051f, 0.6019751429557800f, 0.5985173583030701f, + 0.5950419306755066f, 0.5915485620498657f, 0.5880369544029236f, 0.5845066905021668f, + 0.5809575319290161f, 0.5773891210556030f, 0.5738010406494141f, 0.5701928734779358f, + 0.5665643215179443f, 0.5629149675369263f, 0.5592443943023682f, 0.5555521249771118f, + 0.5518378019332886f, 0.5481008887290955f, 0.5443409681320190f, 0.5405575633049011f, + 0.5367501974105835f, 0.5329182744026184f, 0.5290612578392029f, 0.5251786708831787f, + 0.5212698578834534f, 0.5173342823982239f, 0.5133713483810425f, 0.5093802809715271f, + 0.5053604841232300f, 0.5013113021850586f, 0.4972319900989533f, 0.4931217730045319f, + 0.4889798760414124f, 0.4848054647445679f, 0.4805977046489716f, 0.4763557314872742f, + 0.4720785915851593f, 0.4677653014659882f, 0.4634148776531220f, 0.4590262174606323f, + 0.4545982778072357f, 0.4501298367977142f, 0.4456196725368500f, 0.4410665333271027f, + 0.4364690184593201f, 0.4318257570266724f, 0.4271352589130402f, 0.4223958849906921f, + 0.4176059961318970f, 0.4127638638019562f, 0.4078675508499146f, 0.4029151201248169f, + 0.3979044854640961f, 0.3928333818912506f, 0.3876994550228119f, 0.3825001418590546f, + 0.3772327601909638f, 0.3718944191932678f, 0.3664819598197937f, 0.3609921038150787f, + 0.3554212152957916f, 0.3497654199600220f, 0.3440205454826355f, 0.3381820321083069f, + 0.3322449624538422f, 0.3262038826942444f, 0.3200529813766480f, 0.3137857317924500f, + 0.3073950409889221f, 0.3008730411529541f, 0.2942109704017639f, 0.2873990833759308f, + 0.2804264426231384f, 0.2732807695865631f, 0.2659481167793274f, 0.2584125101566315f, + 0.2506556510925293f, 0.2426563650369644f, 0.2343897670507431f, 0.2258265018463135f, + 0.2169314622879028f, 0.2076619714498520f, 0.1979654580354691f, 0.1877757459878922f, + 0.1770076900720596f, 0.1655484437942505f, 0.1532430052757263f, 0.1398682296276093f, + 0.1250815242528915f, 0.1083061024546623f, 0.0884171426296234f, 0.0625101774930954f +}; -//Makro - added missing ";" double G_acos(double x) { int index; diff --git a/reaction/game/g_weapon.c b/reaction/game/g_weapon.c index 277c9e9b..48da6f1f 100644 --- a/reaction/game/g_weapon.c +++ b/reaction/game/g_weapon.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.92 2003/09/19 21:25:10 makro +// Flares (again!). Doors that open away from players. +// // Revision 1.91 2003/09/01 15:09:49 jbravo // Cleanups, crashbug fix and version bumped to 3.2 // @@ -356,7 +359,7 @@ qboolean DoorKick(trace_t * trIn, gentity_t * ent, vec3_t origin, vec3_t forward { gentity_t *traceEnt; trace_t tr; - qboolean ok; + qboolean ok = qfalse; traceEnt = &g_entities[trIn->entityNum]; if (Q_stricmp(traceEnt->classname, "func_door_rotating") == 0) { @@ -371,14 +374,19 @@ qboolean DoorKick(trace_t * trIn, gentity_t * ent, vec3_t origin, vec3_t forward VectorSubtract(origin, traceEnt->s.origin, d_forward); crossProduct = d_forward[0] * d_right[1] - d_right[0] * d_forward[1]; - // See if we are on the proper side to do it - // Makro - it didn't take into account moverstate - ok = ((traceEnt->pos2[1] > traceEnt->pos1[1]) && crossProduct > 0) || - ((traceEnt->pos2[1] < traceEnt->pos1[1]) && crossProduct < 0); - if (traceEnt->moverState == ROTATOR_1TO2 || traceEnt->moverState == ROTATOR_POS2) { - ok = !ok; + //Makro - doors that open away from the player can be kicked from either side + if (traceEnt->spawnflags & SP_OPENAWAY) { + ok = qtrue; + } else { + // See if we are on the proper side to do it + //Makro - it didn't take into account moverstate + ok = ((traceEnt->pos2[1] > traceEnt->pos1[1]) && crossProduct > 0) || + ((traceEnt->pos2[1] < traceEnt->pos1[1]) && crossProduct < 0); + if (traceEnt->moverState == ROTATOR_1TO2 || traceEnt->moverState == ROTATOR_POS2) { + ok = !ok; + } } - if (ok && !traceEnt->targetname) { + if (ok && !traceEnt->targetname && !traceEnt->takedamage) { //Cmd_OpenDoor( ent ); //Makro - Cmd_OpenDoor opens ALL the doors near the kicked one Use_BinaryMover(traceEnt, traceEnt, ent); diff --git a/reaction/game/game.plg b/reaction/game/game.plg index 99b3ae5a..c988c8f5 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -3,116 +3,108 @@
 

Build Log

---------------------Configuration: game - Win32 Release-------------------- +--------------------Configuration: cgame - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP314.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6EE.tmp" with contents [ -/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c -"C:\Games\Quake3\rq3source\reaction\game\g_mover.c" +/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"Release/" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP314.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP315.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6EE.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6EF.tmp" with contents [ -kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" -\reactionoutput\ai_chat.obj -\reactionoutput\ai_cmd.obj -\reactionoutput\ai_dmnet.obj -\reactionoutput\ai_dmq3.obj -\reactionoutput\ai_main.obj -\reactionoutput\ai_team.obj -\reactionoutput\ai_vcmd.obj -\reactionoutput\bg_misc.obj -\reactionoutput\bg_pmove.obj -\reactionoutput\bg_slidemove.obj -\reactionoutput\g_active.obj -\reactionoutput\g_arenas.obj -\reactionoutput\g_bot.obj -\reactionoutput\g_client.obj -\reactionoutput\g_cmds.obj -\reactionoutput\g_combat.obj -\reactionoutput\g_fileio.obj -\reactionoutput\g_items.obj -\reactionoutput\g_main.obj -\reactionoutput\g_matchmode.obj -\reactionoutput\g_mem.obj -\reactionoutput\g_misc.obj -\reactionoutput\g_missile.obj -\reactionoutput\g_mover.obj -\reactionoutput\g_session.obj -\reactionoutput\g_spawn.obj -\reactionoutput\g_svcmds.obj -\reactionoutput\g_syscalls.obj -\reactionoutput\g_target.obj -\reactionoutput\g_team.obj -\reactionoutput\g_teamplay.obj -\reactionoutput\g_trigger.obj -\reactionoutput\g_unlagged.obj -\reactionoutput\g_utils.obj -\reactionoutput\g_weapon.obj -\reactionoutput\q_math.obj -\reactionoutput\q_shared.obj -\reactionoutput\rxn_game.obj -\reactionoutput\zcam.obj -\reactionoutput\zcam_target.obj +/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib" +.\Release\bg_misc.obj +.\Release\bg_pmove.obj +.\Release\bg_slidemove.obj +.\Release\cg_atmospheric.obj +.\Release\cg_consolecmds.obj +.\Release\cg_draw.obj +.\Release\cg_drawtools.obj +.\Release\cg_effects.obj +.\Release\cg_ents.obj +.\Release\cg_event.obj +.\Release\cg_info.obj +.\Release\cg_localents.obj +.\Release\cg_main.obj +.\Release\cg_marks.obj +.\Release\cg_players.obj +.\Release\cg_playerstate.obj +.\Release\cg_predict.obj +.\Release\cg_scoreboard.obj +.\Release\cg_servercmds.obj +.\Release\cg_snapshot.obj +.\Release\cg_syscalls.obj +.\Release\cg_unlagged.obj +.\Release\cg_view.obj +.\Release\cg_weapons.obj +.\Release\q_math.obj +.\Release\q_shared.obj +.\Release\ui_shared.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP315.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6EF.tmp"

Output Window

Compiling... -g_mover.c +cg_servercmds.c Linking... - Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP319.tmp" with contents + Creating library Release/cgamex86.lib and object Release/cgamex86.exp +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F3.tmp" with contents [ -/nologo /o"c:\reactionoutput/game.bsc" -\reactionoutput\ai_chat.sbr -\reactionoutput\ai_cmd.sbr -\reactionoutput\ai_dmnet.sbr -\reactionoutput\ai_dmq3.sbr -\reactionoutput\ai_main.sbr -\reactionoutput\ai_team.sbr -\reactionoutput\ai_vcmd.sbr -\reactionoutput\bg_misc.sbr -\reactionoutput\bg_pmove.sbr -\reactionoutput\bg_slidemove.sbr -\reactionoutput\g_active.sbr -\reactionoutput\g_arenas.sbr -\reactionoutput\g_bot.sbr -\reactionoutput\g_client.sbr -\reactionoutput\g_cmds.sbr -\reactionoutput\g_combat.sbr -\reactionoutput\g_fileio.sbr -\reactionoutput\g_items.sbr -\reactionoutput\g_main.sbr -\reactionoutput\g_matchmode.sbr -\reactionoutput\g_mem.sbr -\reactionoutput\g_misc.sbr -\reactionoutput\g_missile.sbr -\reactionoutput\g_mover.sbr -\reactionoutput\g_session.sbr -\reactionoutput\g_spawn.sbr -\reactionoutput\g_svcmds.sbr -\reactionoutput\g_syscalls.sbr -\reactionoutput\g_target.sbr -\reactionoutput\g_team.sbr -\reactionoutput\g_teamplay.sbr -\reactionoutput\g_trigger.sbr -\reactionoutput\g_unlagged.sbr -\reactionoutput\g_utils.sbr -\reactionoutput\g_weapon.sbr -\reactionoutput\q_math.sbr -\reactionoutput\q_shared.sbr -\reactionoutput\rxn_game.sbr -\reactionoutput\zcam.sbr -\reactionoutput\zcam_target.sbr] -Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP319.tmp" +/nologo /o"Release/cgame.bsc" +.\Release\bg_misc.sbr +.\Release\bg_pmove.sbr +.\Release\bg_slidemove.sbr +.\Release\cg_atmospheric.sbr +.\Release\cg_consolecmds.sbr +.\Release\cg_draw.sbr +.\Release\cg_drawtools.sbr +.\Release\cg_effects.sbr +.\Release\cg_ents.sbr +.\Release\cg_event.sbr +.\Release\cg_info.sbr +.\Release\cg_localents.sbr +.\Release\cg_main.sbr +.\Release\cg_marks.sbr +.\Release\cg_players.sbr +.\Release\cg_playerstate.sbr +.\Release\cg_predict.sbr +.\Release\cg_scoreboard.sbr +.\Release\cg_servercmds.sbr +.\Release\cg_snapshot.sbr +.\Release\cg_syscalls.sbr +.\Release\cg_unlagged.sbr +.\Release\cg_view.sbr +.\Release\cg_weapons.sbr +.\Release\q_math.sbr +.\Release\q_shared.sbr +.\Release\ui_shared.sbr] +Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6F3.tmp" Creating browse info file...

Output Window

+

Results

+cgamex86.dll - 0 error(s), 0 warning(s) +

+--------------------Configuration: game - Win32 Release-------------------- +

+

Command Lines

+ + +

Results

qagamex86.dll - 0 error(s), 0 warning(s) +

+--------------------Configuration: ui - Win32 Release TA-------------------- +

+

Command Lines

+ + + +

Results

+uix86.dll - 0 error(s), 0 warning(s)