re-ordering README credits, one more use for ultra fast sqrt, server checks, sanity stuff
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5475 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+9
-9
@@ -480,6 +480,14 @@
|
||||
Scripts and maps.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Kirin
|
||||
</td>
|
||||
<td>
|
||||
Code contributions and fixes, client stuff, advice.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
V-Man
|
||||
@@ -496,14 +504,6 @@
|
||||
Code advice, 1.1 voice com, and scripts.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Kirin
|
||||
</td>
|
||||
<td>
|
||||
Code contributions and fixes, client stuff, advice.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Drakas
|
||||
@@ -520,7 +520,7 @@
|
||||
<a href="http://ladder.tearyoudown.com/" target="_blank">Ladder server hosting and tournaments organization.</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td>
|
||||
R4zor and others
|
||||
</td>
|
||||
|
||||
@@ -91,6 +91,7 @@ struct vec
|
||||
float magnitudexy() const { return sqrtf(x*x + y*y); }
|
||||
|
||||
float fmagxy() const { return fSqrt(x*x + y*y); }
|
||||
float ufmagxy() const { return ufSqrt(x*x + y*y); }
|
||||
|
||||
bool reject(const vec &o, float max) const { return x>o.x+max || x<o.x-max || y>o.y+max || y<o.y-max; }
|
||||
|
||||
|
||||
@@ -2409,7 +2409,7 @@ int checktype(int type, client *cl)
|
||||
SV_CALLVOTESUC, SV_CALLVOTEERR, SV_VOTERESULT,
|
||||
SV_SETTEAM, SV_TEAMDENY, SV_SERVERMODE, SV_WHOISINFO,
|
||||
SV_SENDDEMOLIST, SV_SENDDEMO, SV_DEMOPLAYBACK,
|
||||
SV_CLIENT };
|
||||
SV_CLIENT, SV_HUDEXTRAS, SV_POINTS };
|
||||
// only allow edit messages in coop-edit mode
|
||||
static int edittypes[] = { SV_EDITENT, SV_EDITH, SV_EDITT, SV_EDITS, SV_EDITD, SV_EDITE, SV_NEWMAP };
|
||||
if(cl)
|
||||
@@ -2847,16 +2847,17 @@ void process(ENetPacket *packet, int sender, int chan)
|
||||
loopk(3) { shot.shot.from[k] = cl->state.o.v[k] + ( k == 2 ? (((cl->f>>7)&1)?2.2f:4.2f) : 0); }
|
||||
loopk(3) { float v = getint(p)/DMF; shot.shot.to[k] = v < 0.0f ? 0.0f : v; }
|
||||
int hits = getint(p);
|
||||
int tcn = -1;
|
||||
loopk(hits)
|
||||
{
|
||||
gameevent &hit = cl->addevent();
|
||||
hit.type = GE_HIT;
|
||||
hit.hit.target = getint(p);
|
||||
tcn = hit.hit.target = getint(p);
|
||||
hit.hit.lifesequence = getint(p);
|
||||
hit.hit.info = getint(p);
|
||||
loopk(3) hit.hit.dir[k] = getint(p)/DNF;
|
||||
}
|
||||
if(!m_demo && !m_coop) checkshoot(sender, shot, hits);
|
||||
if(!m_demo && !m_coop) checkshoot(sender, shot, hits, tcn);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,8 @@ struct client // server side version of "dynent" type
|
||||
int nt[10], np, lp, ls, lsm, ld, nd, nlt, lem, led;
|
||||
vec cp[10], dp[10], d0, lv, lt, le;
|
||||
float dda, tr, sda;
|
||||
int ps, ph, tcn, bdt, pws;
|
||||
float pr;
|
||||
|
||||
gameevent &addevent()
|
||||
{
|
||||
@@ -303,6 +305,9 @@ struct client // server side version of "dynent" type
|
||||
d0 = lv = lt = le = vec(0,0,0);
|
||||
loopi(10) { cp[i] = dp[i] = vec(0,0,0); nt[i] = 0; }
|
||||
dda = tr = sda = 0;
|
||||
ps = ph = bdt = pws = 0;
|
||||
tcn = -1;
|
||||
pr = 0.0f;
|
||||
}
|
||||
|
||||
void reset()
|
||||
|
||||
@@ -588,11 +588,11 @@ inline void checkmove (client *cl)
|
||||
return;
|
||||
}
|
||||
|
||||
inline void checkshoot (int & cn, gameevent & shot, int & hits)
|
||||
inline void checkshoot (int & cn, gameevent & shot, int & hits, int & tcn)
|
||||
{
|
||||
|
||||
#ifdef ACAC
|
||||
s_engine(cn, shot, hits);
|
||||
s_engine(cn, shot, hits, tcn);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user