|
From: <bl...@us...> - 2008-02-27 23:46:08
|
Revision: 440
http://edu2.svn.sourceforge.net/edu2/?rev=440&view=rev
Author: blackhc
Date: 2008-02-27 15:46:07 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Commit a patch from res2k.
Don't remove or respawn terminals.
Don't save the edu2logincommands cvar.
Modified Paths:
--------------
edu2/OffscreenGecko.dll
edu2/OffscreenGecko.pdb
edu2/edu2/csprogs.dat
edu2/edu2/csprogs.lno
edu2/edu2/menu.dat
edu2/edu2/menu.lno
edu2/edu2/progs.dat
edu2/edu2/progs.lno
edu2/id1/qcsrc/cgame/cgame.qc
edu2/id1/qcsrc/cgame/csqc_builtins.qh
edu2/id1/qcsrc/common/geckoterminal.qc
edu2/id1/qcsrc/common/playermodel.qc
edu2/id1/qcsrc/menu/edu2/dialog_login.c
Modified: edu2/OffscreenGecko.dll
===================================================================
(Binary files differ)
Modified: edu2/OffscreenGecko.pdb
===================================================================
(Binary files differ)
Modified: edu2/edu2/csprogs.dat
===================================================================
(Binary files differ)
Modified: edu2/edu2/csprogs.lno
===================================================================
(Binary files differ)
Modified: edu2/edu2/menu.dat
===================================================================
(Binary files differ)
Modified: edu2/edu2/menu.lno
===================================================================
(Binary files differ)
Modified: edu2/edu2/progs.dat
===================================================================
(Binary files differ)
Modified: edu2/edu2/progs.lno
===================================================================
(Binary files differ)
Modified: edu2/id1/qcsrc/cgame/cgame.qc
===================================================================
--- edu2/id1/qcsrc/cgame/cgame.qc 2008-02-27 22:20:00 UTC (rev 439)
+++ edu2/id1/qcsrc/cgame/cgame.qc 2008-02-27 23:46:07 UTC (rev 440)
@@ -123,6 +123,20 @@
// --------------------------------------------------------------------------
// BEGIN OPTIONAL CSQC FUNCTIONS
+// EDU2 handling:
+// entities who dont want to be deleted simply dont remove themself on Ent_Remove
+entity CSQC_Ent_Spawn(float realentnum) {
+ // try to find the entity (if it already exists)
+ entity lEntity;
+ lEntity = findfloat( world, entnum, realentnum );
+ if( lEntity == world ) {
+ dprint( "Couldnt find ", ftos( realentnum ), "\n" );
+ lEntity = spawn();
+ lEntity.entnum = realentnum;
+ }
+ return lEntity;
+}
+
// CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
// The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
void CSQC_Ent_Update(float isNew)
@@ -154,6 +168,7 @@
if( self.RemoveEvent ) {
self.RemoveEvent();
} else {
+ print( "Removing for real: ", self.targetURL, "\n" );
remove(self);
}
}
Modified: edu2/id1/qcsrc/cgame/csqc_builtins.qh
===================================================================
--- edu2/id1/qcsrc/cgame/csqc_builtins.qh 2008-02-27 22:20:00 UTC (rev 439)
+++ edu2/id1/qcsrc/cgame/csqc_builtins.qh 2008-02-27 23:46:07 UTC (rev 440)
@@ -73,7 +73,7 @@
void(vector v1, vector min, vector max, vector v2, float nomonsters, entity forent) tracebox = #90;
vector() randomvec = #91;
vector(vector org) getlight = #92;
-float(string name, string value) registercvar = #93;
+float(string name, string value, float flags) registercvar = #93;
float( float a, ... ) min = #94;
float( float b, ... ) max = #95;
float(float minimum, float val, float maximum) bound = #96;
Modified: edu2/id1/qcsrc/common/geckoterminal.qc
===================================================================
--- edu2/id1/qcsrc/common/geckoterminal.qc 2008-02-27 22:20:00 UTC (rev 439)
+++ edu2/id1/qcsrc/common/geckoterminal.qc 2008-02-27 23:46:07 UTC (rev 440)
@@ -11,6 +11,10 @@
return true;
}
+void() gecko_terminal_reset_flags = {
+ self.effects = 0;
+}
+
void() gecko_terminal = {
self.solid = SOLID_BSP;
self.movetype = MOVETYPE_NONE;
@@ -18,10 +22,14 @@
self.classname = "gecko_terminal";
setorigin (self, self.origin);
setmodel (self, self.model);
-
+
self.SendEntity = gecko_terminal_send;
// send it once
self.Version = 1;
+
+ self.effects = EF_NODEPTHTEST;
+ self.think = gecko_terminal_reset_flags;
+ self.nextthink = time + 0.01;
};
#endif
#ifdef CLIENT
@@ -37,9 +45,6 @@
// used to determine the correct distance from the terminal - is there a better solution? (origin is always 0 0 0)
.vector centroid;
-void() gecko_terminal_think = {
-};
-
void() gecko_terminal_update =
{
setmodelindex( self, readshort() );
@@ -56,12 +61,16 @@
}
void() gecko_terminal_removeEvent = {
- gecko_destroy( self.geckoInstanceName );
- strunzone( self.targetURL );
- remove( self );
+ // dont delete terminals
+ // they are static
}
void() gecko_terminal_spawnFromMessage = {
+ // dont respawn if the terminal only reenters the view
+ if( self.solid == 4 ) {
+ gecko_terminal_update();
+ return;
+ }
self.solid = 4;
setmodelindex( self, readshort() );
@@ -100,7 +109,7 @@
// remove the "textures/"
self.geckoInstanceName = strzone( substring( lTextureName, 9, 1000 ) );
- print( self.geckoInstanceName, ": ", self.targetURL, "\n" );
+ dprint( self.geckoInstanceName, ": ", self.targetURL, "\n" );
gecko_create( self.geckoInstanceName );
if( substring( self.targetURL, 0, 7 ) != "http://" ) {
@@ -118,9 +127,6 @@
self.classname = "gecko_terminal";
self.RemoveEvent = gecko_terminal_removeEvent;
self.UpdateEntity = gecko_terminal_update;
- self.think = gecko_terminal_think;
- // sucky..
- self.nextthink = time;
};
// only x and y are used
Modified: edu2/id1/qcsrc/common/playermodel.qc
===================================================================
--- edu2/id1/qcsrc/common/playermodel.qc 2008-02-27 22:20:00 UTC (rev 439)
+++ edu2/id1/qcsrc/common/playermodel.qc 2008-02-27 23:46:07 UTC (rev 440)
@@ -250,7 +250,7 @@
playerPart.(animData[ lAnimIndex ]) = lAnimData;
//print( vtos( lAnimData ), "\n" );
}
- print( "Loaded animfile '", modelDir, "/animation.cfg'\n" );
+ dprint( "Loaded animfile '", modelDir, "/animation.cfg'\n" );
}
string( float type ) _PlayerModel_GetModelSuffix = {
Modified: edu2/id1/qcsrc/menu/edu2/dialog_login.c
===================================================================
--- edu2/id1/qcsrc/menu/edu2/dialog_login.c 2008-02-27 22:20:00 UTC (rev 439)
+++ edu2/id1/qcsrc/menu/edu2/dialog_login.c 2008-02-27 23:46:07 UTC (rev 440)
@@ -48,7 +48,7 @@
menu_delayed_time = time + 3.0;
menu_delayed_function = LoginDialog_ReloadProfile;
- registercvar( "edu2logincommands", "map $edu2map", CVAR_SAVE );
+ registercvar( "edu2logincommands", "map $edu2map", 0 );
localcmd( cvar_string( "edu2logincommands" ), "\n" );
Edu2InfoTabsDialog_onLoggedIn();
me.close( me );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|