Vanilla Clients Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

That CLOAK_MAXWARP thing and a note about features



Hey all.

Some of Trent's comments in r.g.n. got me thinking.  This is the
paragraph in question:


Trent Piepho <xyzzy@speakeasy.org> wrote:

>        When the puck travels at warp 15 or 31, it will no longer
> cloak.  This is a kludge fix to a problem created by the
> CLOAK_MAXWARP kludge.  The hockey server has MIT has a server side
> kludge to fix this; when at warp 15 the puck reports its speed as
> 14.  What a mess.

The correct fix is a server side fix and is below (with comments afterwards)

--- feature.c   1999/04/30 20:18:43     1.3
+++ feature.c   1999/11/22 21:56:36
@@ -38,6 +38,8 @@
     int    *var; /* local variable */
 };
 
+int F_cloak_maxwarp = 0;
+
 struct feature_var feature_vars[] = {
    { "FEATURE_PACKETS",                &F_client_feature_packets },
 #ifdef CHAIN_REACTION
@@ -46,7 +48,7 @@
    { "SBHOURS",                        &SBhours },
    { "SELF_8FLAGS",            NULL },
    { "RC_DISTRESS",            NULL }, /* xx */
-   { "CLOAK_MAXWARP",          NULL },
+   { "CLOAK_MAXWARP",          &F_cloak_maxwarp},
    { "SHIP_CAP",               &F_ship_cap},
    { "DEAD_WARP",              &dead_warp },
    { NULL, NULL },

and edit .features to turn CLOAK_MAXWARP off.  No kludging of the
speed needed.  Patch committed to the repository as the default is the
status quo and this patch just makes it a settable feature.  Speaking
of which, since clients are coming out which support all these
features, and all these features are in the .features file, shouldn't
those NULLs turn into variables?  I mean, we make it look like they're
settable, why not make that reality?

What is the "CLOAK_MAXWARP kluge?" Now searching through Vanilla and
COW for what CLOAK_MAXWARP is, it appears to be a bit of a flag for
cloaked.  The server is setting speed of the cloaker to an arbitrary
value (15 in this case) in order to mask the true speed of the cloaker
(UPDT_MOST and UPD_MANY modes).  If the CLOAK_MAXWARP feature is on,
the client interprets speed==15 to mean that the guy going warp 15 is
cloaked, even if he isn't. This is appears to be unrelated to UPDT_*
except in how it is interpreted.  This is a minor problem in hockey,
mainly. Puck can go warp 25.  And server gods playing in an ATT.  That
goes warp 60.

My question is: Ummmm.... why?  What is the history of the
CLOAK_MAXWARP feature?  There are comments that indicate it is
something Joe Rumsey put in, at least in the server. No comments in
COW. Maybe there was a mis-interpretation somewhere between client and
server developers. Cloaking info comes across just fine with or
without it (minor exception noted below).  I'm just wondering if this
feature is justified in living?  The only thing I can think of is that
it is a redunant flag just in case the cloak packet was lost.

The minor exception is an unlikely to occur case.  I found this out
while testing the patch above. If _nobody_ is moving, cloak and sheild
status changes do not get sent.  As soon as somebody moves or changes
heading, cloak and sheild info comes across.  It is unlikely that
nobody would be moving during a game so nothing has to be done,
really.  I just included this for completeness sake.

--Carlos V.