Re: [hlcoders] Our MOD's are for sale !!
It does kind-of irk me that these guys are making so much money off of our hard work, but is it really anything different than organizations like fileplanet does? They are charging you for downloading and making a CD copy for you, not for the games themselves (or so they could argue). Maybe the question we should be asking is if it is okay for us to do the same sorts of things to recoup some of our costs? As long as mods continue to be freely available to download, can we set up services to distribute the mod on CD for a small fee to customers that prefer not to download 100+ meg? Not that I had even thought of this before now, but it might be a way for some mods to pay for some of the bandwidth required to host mod sites and fund development. Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com At 02:01 PM 29/12/2002 +, you wrote: This maybe a little OT, but in any case it affects a lot of us I recently went to a computer fair here in the UK, one stand was selling lots of obviously copied CD's... The Quality of the CD Labels and Inserts were infact diabolical.. I stumbled across a CD with several HL mod's on it... the main picture was of Counter Stirke the mods were listed on the back, amongst the mods were my own mod Wanted, as well as lots of other popular mods, Action HL, DoD etc..etc... too many to list... but the vendor was illegally selling the CD's for £10.00 GBP. When I confronted the seller asking what permission he had for selling these mod's.. he stated they were all free-ware... I know this is not the case, although Mods are avaliable freely for download, it is not legal to re-sell them... So I want to know what you people think of this... I know that many of us don't get a penny for all the time and effort we put in to creating these mods, but it drives me mad to think that someone else is just downloading them, cutting them to disc and making money out of doing so. I forced the seller to give me the details of the person who he gets them from, which I now have. (although I only have a name and UK Telephone number). What are your thoughts ? Mike. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] OpenGL vs D3D
At 01:35 AM 27/11/2002 -0500, you wrote: Omega, Botman, and Commando, Thanks for the information. I should have checked that first. I guess that I was thrown off by the comment in r_studioint.h: // True if using D3D/OpenGL. NP Scott, I was also thrown off by that comment when I was trying the same thing and asked here back then. Luckily someone at Valve answered my question then, but that is why I am still working with the HL engine instead of moving on, you can't beat the support :D Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] OpenGL vs D3D
IsHardware() returns 0 if it's in Software mode, 1 if it's OpenGL, 2 if it's D3D. Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com At 04:02 PM 26/11/2002 -0500, you wrote: On the client side, I know that IEngineStudio.IsHardware() can determine if the player is using software or hardware modes. But how can I distinguish between OpenGL and D3D hardware modes? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] More hud difficulties
First, make sure scouter is in your hud.txt and that the number of entries at the top is still correct. Then add a new member variables to your CHudScouter class to hold the sprite and the rect so they are not being loaded every frame and so that you can debug it easier (looking at your code, you may already have these); HSPRITE m_hSprite; wrect_t*m_prc; Now do your loading in VidInit() int CHudScouter::VidInit(void) { m_HUD_Scouter = gHUD.GetSpriteIndex( lant_off ); m_hSprite = gHUD.GetSprite(m_HUD_Scouter ); m_prc= gHUD.GetSpriteRect(m_HUD_Scouter ); } Now you can properly debug and see if m_hSprite is getting loaded and if your rect (m_prc) is the correct size. If not, your hud.txt is wrong. Next reduce your Draw to the bare minimum; int CHudScouter::Draw(float flTime) { if ( gHUD.m_iHideHUDDisplay ( HIDEHUD_ALL ) ) return 1; if (!(gHUD.m_iWeaponBits (1(WEAPON_SUIT)) )) return 1; SPR_Set(m_hSprite, 255, 255, 255); SPR_DrawHoles(0, 50, 50, m_prc); return 1; } You can also comment out the first two checks there if you are paranoid and add them in when you get it working. Rob 'Commando' Prouse http://www.tourofdutymod.com At 12:29 AM 23/10/2002 -0700, you wrote: Welp got debugging full fledged, ran it through It goes through my init, my vidinit, and even my draw. and it steps through all the code cleanly yet It still doesn't display my sprite on the screen. --Health.cpp-- ... int CHudScouter::Init(void) { HOOK_MESSAGE(Scouter); m_iHealth = 0; m_iKi = 0; m_iPwrLvl = 0; m_iFlags = 0; gHUD.AddHudElem(this); return 1; } ... int CHudScouter::VidInit(void) { m_hSprite = 0; m_HUD_Scouter = gHUD.GetSpriteIndex( scouter ); m_iFlags |= HUD_ACTIVE; return 1; } ... int CHudScouter::Draw(float flTime) { int r, g, b; int a = 0, x, y; ASSERT((m_iFlags (HUD_ACTIVE))); r = 255; g = 255; b = 255; a = 255; x = 50; y = 50; SPR_Set(gHUD.GetSprite(m_HUD_Scouter), r, g, b); SPR_DrawHoles(0, x, y, gHUD.GetSpriteRect(m_HUD_Scouter)); return 1; } ... --End of Health.cpp-- Now you look at that and tell me I haven't done anything wrong ?, I can get the sprite index and display my sprite for the scouter in place of my healthhud in my healthhud class, so it isn't getspriteindex. x and y are both in perfect position on the screen, The alpha test sprite should display with full intensity and when I run through the debugger and handset the x,y, values just in case, It still doesn't display them. Now Am I just loosing it or what ? because that seems like a problem with the engine to me, *remember I said I ran breakpoints and it went through my init, my vidinit, and then every loop it runs to draw the hud pieces it hit my scouters hud draw breakpoint, and I successfuly stepped into every statement and return 1; successfully and it continued to loop and draw it like normal* Anymore help would be much appreciated, I just don't know what else to do other then merge the scouter into my health hud which I really want to avoid. Thankyou all ahead of time for assistance. And i'm sorry for the length of code, but I'm sure one of you would have mearly accused me of just making typo's. Pj Bean Lead Coder of Sr(http://www.sr.flagrun.net) ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] More hud difficulties
Paul, Make sure you have added a member variable for your new hud element to CHud and call Init() in CHud::Init() and VidInit() in CHud:VidInit(); If that is done, make sure that it is not your drawing code. Comment out anything that might turn it off (or whatever you have that turns it on and then turn it on in VidInit(). Does it display now? Then it is your communication code that is broken. Put a breakpoint in Init() and VidInit(). Are they getting called? Walk through VidInit() and make sure the sprite is getting loaded (just because it works elsewhere, doesn't mean you don't have an invisible typo here ;) ) If it is getting loaded, put a breakpoint in the Draw and walk through it. Are the x and y coords right? (might be drawn off screen) Are you getting to the actual drawing code? Is the size of your rectangle that you pass into the draw valid? Is the sprite NULL? A quick bout of debugging should cure your ills. Good luck. Rob 'Commando' Prouse http://www.tourofdutymod.com At 02:24 AM 22/10/2002 -0700, you wrote: Hey how's it going again :) it's annoying me. Anyways, I've recently tried to establish a new hud element, In fact, I copy and pasted the health hud and took out everything I didn't need. I kept m_iFlags and all virtual members, and inherited from basehud *like I said i just copy and pasted health's class and functions and renamed and removed* Now, For Some insane reason, The hud won't draw what I tell it to display(If it's even calling my draw funciton at all), I addhudelem and flag m_iFlags active(on init, not when a message is recieved like the healthhud) and my draw init and vidinit functions are intact (I also called init and vidinit in chud::init) My reset function is blank because I have nothing to reset atm. I look through the code and all the hud does is cycle through a linked list untill it hit's a null pointer and call's the draw function untill it does. I recently went on an inovation, and had the server check if the server had updated the hud piece and if it didn't send an update with dummy values, and then had m_iFlags flag active whenever it recieved a message, This did not work as wellI'm very concerned, I've checked everywhere And I just can't find hte problem I know it's not the sprite, because I had my health sprite load it instead of the normal hud health sprite instead just to make sure. Anyways, any help would be greatly appreciated as is its 2:30 am and I'm plum stuck. THanks for reading my message ahead of time. Paul Lead Coder of Sr(http://www.sr.flagrun.net) Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Config vars for improved graphics?
At 07:53 PM 17/10/2002 +0100, you wrote: Correct me if I'm getting confused but surely HL uses as much memory as needed and considering the sort of spec machines around nowadays and the capabilities of gfx cards then having several Mb of texture memory for each npc isn't such an issue. Or does the HL engine have internal limitations that hold it back in regards to assigning memory usage? I don't think that HL has internal limitations that hold back it's memory usage, but no matter how powerful todays machines are, memory will be exhausted at some point. Many computers today have 128-256 meg of memory and 32-64meg of memory on the graphics card. The memory on the graphics card is not just being used by the textures, it is also being used by the models and maps and for all that graphics processing that the card does. Using textures that are 1meg big can add up very quickly. How many textures are used in the average map? Don't forget player models, v_models, p_models w_models for every weapon, map models, monsters, sprites, decals, etc. That can quickly add up to 64 meg for textures alone. Whatever the gfx card cannot handle, gets put in main memory, but that is limited too. Depending on the map, our mod uses around 125meg of memory and we keep our textures as small as is reasonably possible. DoD, CS and even HL are similar. Add to that the memory being used by the OS and services running on your computer. Right now, I only have a few programs open (not HL) and I am using 307 meg (damn windows wastage ;) ) of which 227 is not cached. So, if you use too much memory, you get delays as memory is swapped between main memory and graphics memory, then if you use way too much, you start getting major lag when stuff starts swapping to your HD. Not to mention how long it will take your level to load if all of your textures are 1meg (1024x1024). Also, like sluggo said, most models display at about 200 pixels in-game, do detail above about 256 pixels is a bit of a waste. The renders that your modelers do and you post on your web site will look great, but the players in-game will not be able to tell the difference. So, you should still be budgeting everything in your mod and expending memory where it will make the most difference (ie the most used weapon, a common map texture) and saving wherever you can. Today's machines have more memory, but it is not unlimited. Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Sounds automatically called?
At 04:53 PM 17/10/2002 -0400, you wrote: Does DefaultReload() automatically call sounds that look like they're related to the gun? Cause, I never told it to use these sounds in my sound\weapons folder, but it's using them anyway. Like uhm4a1_clipout.wav. I never told it to use it, but it uses it. At first I figured maybe the default sound was similar to the one in my mod's folder...but I edited the sound, and it was actually the sound in my folder. So, apparently it uses the sound even without me asking to use it. I mean, I was going to make it use it anyway, but it did it before I wrote the code. I wouldn't have a problem with this if it was just timed right. The clip is taken out in the animation, but the sound is a little delayed...so it's buggin' me. It's not just the clipout sound, it's all the sounds related to the m4a1. The sounds for certain things are compiled into the model as events that play when the animation is played. For example, here is the line for the reload animation for our AK47. As you see, it plays the clipout.wav on frame 13 of the animation and the clipin on frame 42. This is in the QC file that is used to compile the model. $sequence reload6 reload6 fps 30 { event 5004 13 weapons/ak47_clipout.wav } { event 5004 42 weapons/ak47_clipin.wav } Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] LINUX CPU Threads in the HL Workspace
On Linux, you want to use the pthread library. The equivilent of _createthread(...) in pthreads is pthread_create(...). You will need to include pthread.h. For more info, check out http://www.llnl.gov/computing/tutorials/workshops/workshop/pthreads/MAIN.html Also, if you want to keep everything portable and use the same code on Windows and Linux, there is an LGPL pthread library for win32 at http://sources.redhat.com/pthreads-win32/ They also have some links to other tutorials. You will need to distribute the dll and let people know where the source is available, but those are minor inconveniences compared to dozens of #ifdef WIN32s in your code ;) Rob Prouse http://www.tourofdutymod.com At 06:53 PM 11/10/2002 +1000, you wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Following up from my post ages ago regarding making CPU threads... I managed to do it with _createthread, however this only works in win32. Is it possible to create a new CPU thread in the server dll under a linux environment? I have a mate assisting me with the linux compile: Hi, I looked for threads in halflife, cause the server crashes when creating a thread. And I found that: nm engine_i386.so |grep -i Thread 0008eaa4 T NET_StartThread 0008eadc T NET_StopThread 0008e5b8 T NET_ThreadLock 0008e5c0 T NET_ThreadUnlock w _pthread_cleanup_pop_restore w _pthread_cleanup_push_defer 00395488 B dwNetThreadId 000b6efc D hNetThread 000b6d9c d net_thread_initialized w pthread_mutex_lock w pthread_mutex_unlock 000b6d98 D use_thread So HL uses threads internally. But they never call pthread_create to create a thread. Maybe they are using another thread implementation and the two implementations doesn't like each other. I'll try to find a solution for that, but I think it will take some time. Maybe you have to contact sierra/valve for an answer. If someone could assist me with this, it would be greatly appreciated. Cheers guys, FragMented HL Rally PR Manager http://hlrally.net -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: Re[2]: [hlcoders] returning string
Actually, the in a declaration like that is a reference, not the address of operator. Kinda confusing shared syntax ;) What you told him to do is correct though, I am just nit-picking :D int i = 1; int r = i; // r is a reference to i int *p = i;// p is a pointer to i // All of these print 1 cout i = i endl; cout r= r endl; cout *p= p endl; // This prints a memory address cout p= p endl; Rob At 03:33 PM 05/10/2002 +0200, you wrote: Vyacheslav - try: char szMes[25]; void ReturnTestString(char* szSring, int Id); ReturnTestString(szMes, 1); the '' sign before a variable name means address-of the variable. when declaring the function, the name szString is just the name of the variable inside the function. ReturnTestString just needs to know the variable is a string, which is char*. btw, putting a * after a type (like char*) means the variable is a pointer to that type. for more info, check out: http://www.cplusplus.com/doc/tutorial/tut3-2.html (about strings) http://www.cplusplus.com/doc/tutorial/tut3-3.html (about pointers) hope this helps, barret - Original Message - From: Vyacheslav Djura [EMAIL PROTECTED] To: barret [EMAIL PROTECTED] Sent: Saturday, October 05, 2002 3:18 PM Subject: Re[2]: [hlcoders] returning string Hello barret, Saturday, October 5, 2002, 3:56:48 PM, you wrote: b hi - b i did something similar, but i used: b char szMes[25]; //need szMes to be a string, not a char. in this case an b array of chars. b //25 is just my guess for how big it can get Then, how to write header of this function (char* szSring,int Id) so array will be fixed (25) ? I am not good at C++'s * and ? thanks... -- Best regards, Vyacheslavmailto:[EMAIL PROTECTED] ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: Re[2]: [hlcoders] returning string
At 07:03 PM 05/10/2002 +0200, you wrote: Wouldn't it be : cout *p= *p endl; /me bad too, I was typing too quickly and forgot the * :( Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Problems getting on this list...
At 12:14 PM 17/09/2002 -0400, you wrote: Who (if anyone) can he e-mail directly to get added to the list? Thanks in advance for your help :) Why not post the error he gets so that the problem can be fixed and other people don't have to get their friends to request a manual registration? Rob Prouse (Commando) Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Speed bug
Some of our users have reported that when you run along a wall and hold the Move Left or Right button so that you push into the wall, you run much quicker. I tested this by adding the following code to CBasePlayer::ItemPostFrame() to output the velocity of the player. ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length()); Our max player speed is set at 250. Running normally I see numbers like this. When running along a wall and pressing into it, the number jumps to 360. I double checked this by timing myself running across a large room. Normally it takes 9 seconds, but by taking advantage of this bug I can run across in 6 seconds. I am pretty sure this is a bug in the SDK or the engine as we have not modified any of this code and I have experienced this in other mods. Is this a known bug? If so, is there a fix for it? Rob Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Speed bug
I tried running diagonally and it doesn't increase the speed by much. I will give Botman's suggestion a try though and see if it helps. Rob Prouse http://www.tourofdutymod.com At 05:39 PM 16/05/2002 -0400, you wrote: When you run DIAGONALLY, do you exceed 250 as well? I've seen this before because the max speed is only across the AXIS. That is, if yoy have a max speed of 250, that means 250 across the x AND 250 across the Y, which linearly is over 350 units. You can cap the movement velocity by using something akin to: int iVelocity = pev-velocity.Length2D(); if (iVelocity iMaxSpeed ) { pev-velocity.x = pev-velocity.x * iMaxSpeed / iVelocity; pev-velocity.y = pev-velocity.y * iMaxSpeed / iVelocity; } ...at least I *think* that's right. You'd have to do calculations such as this where you process the cmd-forwardmove and cmd-sidemove in the client code. This is all talking out of my ass; I don't have the code in front of me and haven't touched this part of it in ages. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Commando Sent: Thursday, May 16, 2002 4:36 PM To: [EMAIL PROTECTED] Subject: [hlcoders] Speed bug Some of our users have reported that when you run along a wall and hold the Move Left or Right button so that you push into the wall, you run much quicker. I tested this by adding the following code to CBasePlayer::ItemPostFrame() to output the velocity of the player. ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length()); Our max player speed is set at 250. Running normally I see numbers like this. When running along a wall and pressing into it, the number jumps to 360. I double checked this by timing myself running across a large room. Normally it takes 9 seconds, but by taking advantage of this bug I can run across in 6 seconds. I am pretty sure this is a bug in the SDK or the engine as we have not modified any of this code and I have experienced this in other mods. Is this a known bug? If so, is there a fix for it? Rob Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] adding weapons to HUD
It sounds like you are using the same slot/position as one of the HL weapons. There aren't many free slots, so you will have to find a free one or remove some HL weapons. Also, don't forget that the slot returned by iItemSlot() is 1 based and the slot in p-iSlot is 0 based, so the one in p-iSlot should be 1 less than the one in iItemSlot(). If all of this is correct, check out my tutorial at http://www.tourofdutymod.com/tutorials.php?sec=weapons and make sure that you have completed all of the steps, you might have missed something small in coding your weapon, especially if you are using the 2.2 SDK. Rob Prouse http://www.tourofdutymod.com At 12:08 PM 04/05/2002 +, you wrote: it comes up in the same slot as the mp5 shotgun and cross bow does. i can give it to the player it in the console and it shows up as the mp5 but as soon as i get the hl mp5 it won't let me use the default one so basicly when eva i pick HL's mp5 it goes to mine or if i have the HL one to start with and give the player mine it won't let ya pic it :( ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] 3 round burst bug
We saw something similar with Tour of Duty when we added recoil to our weapons in the PrimaryAttack. When playing locally or a lan game, everything worked fine, but when playing on the network, I found that the PrimaryAttack got called three times for every shot on client side. It was as if the m_flNextPrimaryAttack was not being used on the client in network games. The weird thing was that m_iClip had the same value each of the three times, even though we decremented it each time. We never noticed this before we put in the recoil because it happened so quickly, it looked like one shot. Once we put the recoil in, it got applied three times client side. I just figured that I had broken something when I ported from 2.0 to 2.2, but maybe it is a bug in client side prediction. I was never able to track it down because debugging a network game is no fun. I just fixed it by not applying recoil client side ;) A hack, but it works. I would be interested to know if anyone else experiences this and it is a bug in the SDK. It is simple to check, just put a breakpoint in your primary attack and connect to a net server (not lan) and give it a try. Maybe you are experiencing the same thing, but it is manifesting a different way. Rob Prouse http://www.tourofdutymod.com At 06:12 PM 03/05/2002 +1000, you wrote: Firearms suffers from the same bug :( We have yet to track it down, but it will be related to how the client predicts the operation of weapons code. I suspect something is getting reset when it shouldn't be and allowing more bullets to fire. A quick fix can be to have a special 3 round bust mode (and anim), but this isn't ideal. - Original Message - From: Josh Coyne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 03, 2002 2:32 PM Subject: [hlcoders] 3 round burst bug This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hey guys, one our weapons, the SMG9, has a 3 round burst toggle mode; for the most part it works perfectly in no lag and even 'low' lag situations, up to about 200ms or so. but once you go past 200ms, the gun starts shooting extra bullets. its kind of weird; and im pretty much clueless on how to stop it. Now i made some support functions a while ago (PackWeapon and UnpackWeapon) to transfer data from the server to the client for prediction, and i properly send the m_iAllowFire, and m_iBulletCount variables for the prediciton, and it works lovely. Can anyone offer hints on making sure the client will only fire 3 times ? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] weapon coding question
Raz, If you are using the 2.2 SDK, I have written a tutorial about everything you must do to get a weapon working including the HUD. It is in the tutorials section at http://www.tourofdutymod.com. Hope this helps. Rob Prouse Tour of Duty Mod At 08:06 PM 4/27/2002 +, you wrote: hey i've just started to learn weapon coding and i no that this is simple :\ but i just want to ask how do i add the weapon to the hud i've coded the weapon and it works all fine but i don't no how to add it to the hud so the player can pick it. if n e 1 could tell me how to do this or could tell me where there is a tut on it i'd b thankful cheers Raz ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Sprite problems
It sounds to me like the DLL that the game is loading does not match your source code. Try deleting the DLL in your mod directory, then do a recompile all. See if the DLL gets copied over properly. See if that helps. Rob Prouse http://www.tourofdutymod.com At 06:38 PM 4/23/02 -0500, you wrote: Further troubles... I tried making this a non-static function, but that didn't work either. But here's the REALLY weird part. I was stepping through the new function in the debugger: CSprite* CStreetlamp::MakeSprite( const char* pSpriteName, const Vector origin, BOOL animate ) { CSprite* pSprite = GetClassPtr( (CSprite *)NULL ); pSprite-SpriteInit( pSpriteName, origin ); pSprite-pev-classname = MAKE_STRING(env_sprite); pSprite-pev-solid = SOLID_NOT; pSprite-pev-movetype = MOVETYPE_NOCLIP; if ( animate ) pSprite-TurnOn(); return pSprite; } It has the exact same error as before. However, I noticed that as I step through the function that the value of this, i.e., the street lamp, changes three times. First it goes to some seemingly random memory location, then it changes to 1, then it goes back to its regular location. Is that CRAZY or what? Upon further inspection, I found that in addition to this calamity, the Keyvalue function for the entity is not being called at all. This, too, seems a bit odd. My suspicion was that somehow the game is stumbling over some of the fgd files and somehow, some way, that's messing up the files. However, I then dropped into the disassembler to check what the assembly had to say about it, and learned to my shock that CSprite* pSprite = GetClassPtr( (CSprite *)NULL ); has absolutely no assembly counterpart. In other words, the compiler is somehow skipping right the f**k over it. I have absolutely no clue. I'm going to try recompiling all the maps and the models involved in the hopes that somehow this will fix itself. Is there anyone who's had a similar problem with GetClassPtr? The rest of them seem to be compiling so I can't imagine it's a problem with the template implementation, but the problems like KeyValue suggest to me that it's a run-time problem of some sort, because the fact that GetClassPtr didn't compile shouldn't do anything to KeyValue... Persuter -Original Message- From: [EMAIL PROTECTED] [mailto:hlcoders- [EMAIL PROTECTED]] On Behalf Of Persuter Sent: Monday, April 22, 2002 6:42 PM To: [EMAIL PROTECTED] Subject: [hlcoders] Sprite problems Hey all, having a bit of a problem here: CSprite *CSprite::SpriteCreate( const char *pSpriteName, const Vector origin, BOOL animate ) { CSprite* pSprite = GetClassPtr( (CSprite *)NULL ); -- This line pSprite-SpriteInit( pSpriteName, origin ); pSprite-pev-classname = MAKE_STRING(env_sprite); pSprite-pev-solid = SOLID_NOT; pSprite-pev-movetype = MOVETYPE_NOCLIP; if ( animate ) pSprite-TurnOn(); return pSprite; } For some reason, when I execute the following code with sprites/glow01.spr, multiple times, the indicated line doesn't execute at all except for one instance, the last that is tried. When I use the debugger, it completely steps over the line, even when I try to step into GetClassPtr. It's like the line doesn't exist... I try pleading with the debugger, pointing at the line very insistently and so forth, but to no avail. Anyway, so it doesn't execute the line, which means that pSprite does not exist. This does not trouble the program, however, which happily goes along executing the rest of the code, even while the debugger shows that pSprite doesn't exist. If I step into the function and check the value of this, I find that indeed it DOES have an address. But that address is never returned, and the program proceeds as if nothing had been returned from the function at all! It doesn't even throw errors. It's very odd. Any ideas? Persuter _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] little app
At 03:00 PM 15/04/2002 +, you wrote: Commando wrote: This should work on all systems; No It SHOULDNT work on ANY system. There may be systems on which it DOES, but that is a Bad Thing. It will work on any Windows system (except maybe 95), but the original question was limited to Windows. // Shut down the system and force all applications to close. ExitWindowsEx(EWX_POWEROFF, 0); Applications sould NEVER shut down the system itself. It should not be a matter of courtesy, they souldn't be allowed. I assumed the orriginal question was asking about just closing the application itself. That would, of course, be ok. I know that some brain dead operating systems let any running program do anything it wants, but that is not good. What if someone else is using the system at the time (even on windows they could be editing a shared file)? They could lose all their work. As long as you do not force a shutdown it is okay. Besides, that was the original point of this thread. They are trying to create a program that shuts down the computer when a map that takes several hours is done compiling, probably long after they have gone to bed. If that is how the user decides to use their system, it is not up to us as programmers to tell them it is not a good idea. As for the danger, there is no danger as long as they do not use the EWX_FORCE flag which prevents applications from shutting down properly and saving files upon receiving the WM_QUERYENDSESSION and WM_ENDSESSION messages from Windows. All well behaved programs should handle one or both of these messages if they need to do anything special when the computer shuts down. As for brain dead operating systems doing anything they want, that is the purpose of the security token in the sample code I gave. If the user does not have shutdown priviledges, the computer will not shut down no matter what you do. (On Win2K plus systems anyway, but Win98 isn't really a multi-user system anyway.) Rob Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] little app
Sorry, I cut and pasted that out of some code in my personal shared library, but missed one line. The declaration of hToken is; HANDLE hToken; Have fun. You can change the EWX_POWEROFF to various things if you just want to log off, shutdown or even reboot. I have had trouble with various other ways of doing this not being portable across various OS's, but I have tested this on everything except Win95. Rob Prouse http://www.tourofdutymod.com At 04:56 PM 14/04/2002 +0200, you wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Thx for the tip (and thx to Botman too). I've tried your 2 solutions. The one which is the more appopriate in my case is the one from you, Commando (I like the EWX_POWEROFF flag :) ) ! The only trouble I ran into is that I don't know what should hToken be... I took a look at MSDN... Now, I declare it as PHANDLE, but it must be an other thing to do like : hToken = ...();. Thx in advance :) - Cortex : mapper coder www.hlalbator.fr.st - Original Message - From: Commando To: [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 2:26 PM Subject: Re: [hlcoders] little app This should work on all systems; // Get a token for this process. if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, hToken)) { TOKEN_PRIVILEGES tkp; // Get the LUID for the shutdown privilege. LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, tkp.Privileges[0].Luid); tkp.PrivilegeCount = 1; // one privilege to set tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; // Get the shutdown privilege for this process. AdjustTokenPrivileges(hToken, FALSE, tkp, 0, NULL, 0); CloseHandle(hToken); } // Shut down the system and force all applications to close. ExitWindowsEx(EWX_POWEROFF, 0); At 09:52 AM 13/04/2002 +0200, you wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, I've downloaded the new Hammer 4.3 but there's 2 features I excepted I haven't seen :( The first is to be able to print the map draft... But I can do without it :) The second thing is a Shut down after succesful compilation checkbox... It'd be very useful. Now comes the real code question :D I found a way to get around this without a new version... The principle is to make a little Console Application which could be run after the compil tools (in the Run window) and which shuts down the PC. But I don't know how to shut down a PC in C++... Does anyone know a solution ? - Cortex : mapper coder www.hlalbator.fr.st -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Converting angles to screen pixels
Okay, here's a tough one and I don't really know how to approach it. I want to take an angle (a weapon's accuracy cone actually) and convert it to the number of pixels on screen from a player's viewpoint that angle would cover. I know I will need to take the current FOV and the current screen resolution into account, but I don't really know how to tackle this one. If anyone has done this before, or even if someone can provide parts of the transformation, I would really appreciate the help. Just in case I am not clear in what I am trying to do above, I will explain it here. I want to take a weapons accuracy in degrees (which changes constantly in our mod) and draw sprites on the screen for the crosshair that will give the player a good idea of how accurate their weapon is at that time. I may do it as an expanding circle that represents the weapons current cone of accuracy. Robert Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] little app
This should work on all systems; // Get a token for this process. if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, hToken)) { TOKEN_PRIVILEGES tkp; // Get the LUID for the shutdown privilege. LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, tkp.Privileges[0].Luid); tkp.PrivilegeCount = 1; // one privilege to set tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; // Get the shutdown privilege for this process. AdjustTokenPrivileges(hToken, FALSE, tkp, 0, NULL, 0); CloseHandle(hToken); } // Shut down the system and force all applications to close. ExitWindowsEx(EWX_POWEROFF, 0); At 09:52 AM 13/04/2002 +0200, you wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello, I've downloaded the new Hammer 4.3 but there's 2 features I excepted I haven't seen :( The first is to be able to print the map draft... But I can do without it :) The second thing is a Shut down after succesful compilation checkbox... It'd be very useful. Now comes the real code question :D I found a way to get around this without a new version... The principle is to make a little Console Application which could be run after the compil tools (in the Run window) and which shuts down the PC. But I don't know how to shut down a PC in C++... Does anyone know a solution ? - Cortex : mapper coder www.hlalbator.fr.st -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] TGA Files in Menus
Hey guys, this isn't really a coding question, but problems like this usually fall upon the coders shoulders like it has in my mod, so I thought I would put it out to you guys anyways ;) We are using TFC style menus for our player class selection. We have 24-bit colour TGA files for each of our classes that are displayed in the menus. The files look fine in an editor, but when they are displayed in-game, the colour palette is reduced which causes banding in large areas of similar colours. My guess is that the colours are being reduced to 256 colours, but poorly. Is there any way to improve the appearance of these graphics? I have tried reducing the graphics to 256 colours, but then they don't appear in the menus. I have also tried reducing them to 256 colours then back up to 24-bit, but that doesn't work either. I think I have to reduce them to a specific 256 colour palette, then up them back to 24-bit, but I don't know which palette to use. Anyone have experience or a pointer to info on this? Thanks Rob Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] TGA Files in Menus
Thanks, but I should have been clearer, they are already 32 bit (24bit colour) and transparent, but when HL converts them to 16 bit the palette it chooses seems to be very limited (or at least not optimized for our images), so I get banding in large areas of similar colours. If I knew more about how HL does the conversion to 16-bit, then I could adjust our class screenshots accordingly to make them look as good as possible. Other mods like CS have done a pretty good job with this, but I expect they had graphics artists who knew about things like this instead of coders who throw on graphics artist hats when they have to ;) That's the problem with being a coder isn't it, you need to be competent in all areas of creating a mod from graphics, to mapping, to modelling. Rob Prouse http://www.tourofdutymod.com At 09:27 AM 12/04/2002 -0700, you wrote: You need to use a 32-bit TGA 24bit color and 8bit alpha HL will change the color to 16bit and use the alpha for transparanticy(sp?) -Ms ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] The Torque engine
Or, how about spending $0 for the FULL engine source for CrystalSpace? Is is opensource, free, extremely well maintain and works on pretty much any platform imaginable. I'll probably go with it for my next project ;) Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com At 09:55 AM 04/04/2002 -0500, you wrote: would you rather pay $100,000.00 for FULL engine source or $100.00? even if you have three coders it is still a hell of a lot cheaper than $100,000.00! -Original Message- From: Bob le Pointu [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 03:18 To: [EMAIL PROTECTED] Subject: Re: [hlcoders] The Torque engine Seen on the GG homepage: You purchase the TGE for the incredibly low price of $100 per programmer - $100per programmer ? not per development team ? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Stuck with original gunsound!
If that was the case, then he would hear no sounds, not the sounds from another weapon. It is because he is using the Mp5 client side event. See my other post on that, I am nearly positive that is his problem. Rob Prouse At 09:08 PM 03/04/2002 +0200, you wrote: It could be just a sound problem. I believe that many hl-sounds must be uncompressed and 22Khz and 8-bit format. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Stuck with original gunsound!
I stopped reading when I saw your PRECACHE_EVENT, you are using the mp5 event client side, so it is playing the mp5 fire sounds and the mp5 animations (if they are different). You must add your own client side event code, not just change that line. It is a long process, so I will not explain it here. For more info, see my tutorial on 2.2 SDK weapons at http://www.tourofdutymod.com/tutorials.php?sec=weapons It will walk you through all the steps you need to add a new weapon on both the client and server. Hope this helps. Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com At 06:11 AM 03/04/2002 +, you wrote: I made a duplicate MP5.cpp into a new weapon using the same MP5.cpp code. All seemed green in my pasture... But then i tried to add custom sounds to my new weapon, and i havn't been able to get them to work right! So instead of ranting and whining of how my code sucks, id rather save everyone the trouble of hearing me by jus looking at the code for the problem! PLZ help *NOTE: MP5 fire sounds(hks1) will still override my (m4_1) fire sound. And the reload sound of the new weapon is not even being heard. ALL sounds are in correct folders!* ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] arg, client based CBaseEntity !
Cortex What you need to remember is that most of the methods in CBasePlayer and CBaseWeapon on the client side are just empty stubs that do nothing, or if they do something, they need to do it using different information than on the client side. I ran into the same problems as you when I was basing our accuracy on the player's stamina. You have a few choices, first, you need to duplicate the calculation of your m_precision on the client side using whatever information on the client side you have. This can be difficult because as you have seen, the client doesn't always have all of the information and some of the member variables are just 0. I had to do the same calculations using completely different variables based on information we were transmitting to the HUD. The other problem with this method, is that if you change the way you calculate your precision on the server, you have to make the same update on the client which you will probably forget to do once in awhile. Your second option is to transmit m_precision with all of your client player updates. You will probably need to modify your delta.lst for this too. Client side weapons are a bit of a pain eh ;-) Good luck Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com At 08:05 PM 25/03/2002 +0100, you wrote: Hello, Recently, I wanted to make the players shoots dependant of their accuracy and the weapon they carry. I've added a m_precision // m_accuracy in english :D variable to CBasePlayerWeapon and CBasePlayer. I set them correclty in my Gamerules. So, all right. The problem I'm encountering with the CBasePlayer variable is that on the client side, in CBaseEntity::FireBulletPlayers(...), the CBasePlayer class isn't set according to the server one. Indeed, pPlayer-m_precision is always zero on the client whereas it's the normal value for the server's pPlayer-m_precision ! Really annoying... Any idea how I could get around this ? - Cortex : mapper coder www.hlalbator.fr.st ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Problems with 2.2 SDK Weapon Bodies
I just found a horrible hack in the SDK that has been causing weird problems for my mod and I thought I should post it here in case anyone runs into similar problems. Some of the weapons in my mod depend on multiple bodies in the model. In the 2.0 SDK, the body got sent automatically whenever you called SendWeaponAnim(), but in the 2.2 SDK they added a new default parameter to SendWeaponAnim(). The new last parameter is body and it defaults to 0, so you can no longer just set pev-body and then send off an animation, you must add the body to the end of all your SendWeaponAnim calls for that weapon. This is not the hack though, it is just an inconvenience that you should know about. The hack is this bit of code in hl_weapons.cpp on the client; // Make sure that weapon animation matches what the game .dll is telling us // over the wire ( fixes some animation glitches ) if ( g_runfuncs ( HUD_GetWeaponAnim() != to-client.weaponanim ) ) { int body = 2; //Pop the model to body 0. if ( pWeapon == g_Tripmine ) body = 0; //Show laser sight/scope combo if ( pWeapon == g_Python bIsMultiplayer() ) body = 1; // Force a fixed anim down to viewmodel HUD_SendWeaponAnim( to-client.weaponanim, body, 1 ); } Apparently they were having animation glitches when the client and server got out of sync occasionally, so they threw this hack in to fix it. The problem is though, that it does not care what body your weapon is using, it automatically sets it to 2. I tried commenting this out and there are animation glitches when the player spawns. So, the moral of the story is, if you have a weapon that depends on multiple bodies, add an if (pWeapon == gYourWeapon) and set the body to the correct value. Talk about a maintenance nightmare and bugs waiting to happen ;-) Hope this helps someone, I spent enough hours tearing my hair out over it :D Anyone think this is worth writing a tutorial over? Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Problems with 2.2 SDK Weapon Bodies
At 12:56 PM 25/03/2002 -0800, you wrote: This was done for the HLDM weapons, you can always remove that bit of code for your own mod use. I tried that, but then the wrong animation played sometimes when the player spawned. That may be an artifact of our class selection system and the fact that we modified the way players spawn, so it may work in other mods. Anyway, I just wanted to make people aware of this so that if they ran into the same problem, they wouldn't have to spend as much time as I did looking for it ;-) Rob Prouse http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Linux is the bane of my existence...
You are using a newer version of gcc which is a bit stricter on enforcing the rules. SetThink(DoThink) should actually be SetThink(CGenericMonster::DoThink); If you are starting from scratch, then you should look at Botman's patches for the 2.2 SDK for Borland that he announced a couple of days ago. If not, then just modify every instance of SetThink, SetTouch, SetMoveDone and SetUse in the files in the dlls directory like above. You don't need all of botman's changes because several of them are just for Borland. There are a few more minor errors that you will encounter, but you can figure those out from the error messages or looking what Botman did with those lines. It is a tedious process, but only took me a couple of hours for our mod. Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com At 11:18 PM 12/03/2002 -0500, you wrote: I was able to compile it no problem under Redhat 6.x, but now that that installation tanked and I'm forced on to Redhat 7.2, I have compile issues. Wish I knew the intricacies of Linux; took me an hour to get things like FTP or the HL Dedicated Server running... gcc -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DVALVE_DLL -w -m486 -O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -nostartfiles -fPIC -I. -I../engine -I../common -I../pm_shared -I../persistence -I../game_shared -o obj/genericmonster.o -c genericmonster.cpp genericmonster.cpp: In method 'void CGenericMonster::Spawn ()' genericmonster.cpp:112: invalid static_cast from type '{unknown type}' to type 'void (CBaseEntity::*)()' The line in question is SetThink(DoThink); Suggestions, anyone? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] HUD saytext.cpp question
At 10:22 AM 11/03/2002 -0600, you wrote: So I was working on getting the client.dll to compile, link, and run using the Borland or MinGW C++ compilers and noticed this in the CHudSayText::SayTextPrint() function of the saytext.cpp file... PlaySound( misc/talk.wav, 1 ); ...I don't see a misc directory in the sound directory of the valve\pak0.pak file. Also, since the valve directory doesn't have a sound directory, that file doesn't exist on my machine. The cstrike folder does contain a sound\misc\talk.wav file that just contains the mike off click. But why would you want to play a mike off click when someone sends a TEXT message??? We added this file into our mod so that the user would get an audible notice when someone sends a message. It is just a stupid reminder, but then you know to read the text coming in ;) I am not sure why valve doesn't use it, probably some old code, maybe they had the file in one of their earlier pak files and decided later that it wasn't needed, so removed the file, but forgot the code? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Players random_seed not changing (was 'Clientside events not matching the server')
At 07:59 PM 01/03/2002 +, you wrote: Okay, turning into a longer saga than I hoped I got the code altered to use the shared functions in about an hour, nice and easy Only thing is that it seems the m_pPlayer-random_seed is permanently 0 I'm guessing I missed some critical engine call or something during the change to SDK2x all those years ago and I'm only just noticing now Any ideas where to start looking? The random_seed is set in the client in HUD_WeaponsPostThink() in hl_weaponscpp It is passed in via HUD_PostRunCmd() by the engine On the server side, it is set in CmdStart() in clientcpp which is once again passed in by the engine as far as I can tell Rob Prouse Tour of Duty Mod http://wwwtourofdutymodcom ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://listvalvesoftwarecom/mailman/listinfo/hlcoders
RE: [hlcoders] SDK Differences
At 10:26 PM 28/02/2002 +, you wrote: Cheers for the answer guys So if I was only interested in going a multiplayer mod, but didn't want to do maps or models at first, the Standard SDK would be a good choice The fact it includes mapping bsp software helps when it comes to map creation Would this seem a good way to proceed? Yah, the only reason you would want to go for one of the full SDK's is if you are going to work on a single player mod, or if you are going to modify the multiplayer behavior and have monster entities on your maps For example, we started with the scientist code in the full SDK and created a Vietnamese villager non-combatant character to add some realism to our mod Also, if you want to learn about monster AI or stuff like that, the full SDK is where to find that sort of code Rob Prouse Tour of Duty Mod http://wwwtourofdutymodcom ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://listvalvesoftwarecom/mailman/listinfo/hlcoders
Re: [hlcoders] Monster Speeds
You don't necessarily need multiple models, just multiple animations in the model like the run/walk animations in the scientist model. Then you just need to match up that speed of the animation with the m_flGroundSpeed in CBaseMonster::Move() (actually the derived method in your monster), see Botman's post for more info on that. Commando http://www.tourofdutymod.com At 12:38 AM 17/02/2002 -0800, you wrote: Thanks. I'm actually messing around with the babycrab monster, so I'll see if I can get someone to reanimate it to move slower. I suppose that since the model itself contains the speed, I can't really have a monster which changes speed. Well, I guess I could hack it to load seperate models and have like babycrab200.mdl, babycrab250.mdl, and babycrab300.mdl or something. :) - Varlock ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] DMC strafing effect
For some reason, I sent this, but it didn't hit the list. I probably used a different email address, so here it goes again... I don't play these mods, so I'm not positive that I know what you mean by 'rolled,' but if by that you mean that the view screen rotates slightly, then all you need to do is adjust the punch angle slightly on the client. To do this, adjust ev_punchangle[2] to a positive floating point value to rotate clockwise, and a negative value to rotate counter-clockwise. Depending on which file you do this in, you will probably have to add an extern vec3_t ev_punchangle; If you need to do it server side, I think that adjusting m_pPlayer-pev-punchangle.z will do the same thing, but I have not tested this... Commando http://www.tourofdutymod.com At 02:59 PM 17/02/2002 +0100, you wrote: Hello, in DMC, when you strafe, your view is... rolled. I don't know how to explain this... You cans see this effect in DMC and in a lot of other mods (Blue-Shift, DOD, etc...). I would like to reproduce the same effect in my mod, but I don't know where this effect is controled in DMC... I've taken a look to dmc/view.cpp but I didn't see anything which looks like to do the effect I want. Anyone knows where I have to search ? Thx for any replies :) - Cortex : mapper coder www.hlalbator.fr.st ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] THE DREADED NOOB POST
At 04:36 PM 15/02/2002 +, you wrote: maybe a conglomeration of website links like these would be a better idea. Most of us learn by trial and error and by reading tutorials. Be careful of some tutorials though. I have run into a few in the past that messed stuff up in the game. This is sometimes caused by incompatibilities between the tutorials and recent changes in the SDK like client side events. If you want a list of tutorial sites, we have one on our mod site http://www.tourofdutymod.com/ under the links section. We also have a few tutorials under the tutorial section that are directed at the 2.2 SDK. I have been thinking of compiling a list of all the tutorials on all of these sites into one place, maybe one of these days I will get on that ;o) Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com/ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Weapon Recoil
I am trying to simulate weapons pulling up and to the right when fired full auto by adjusting the punch angle client and server side and this works fairly well. The only problem is that the punch angle causes the point of aim and the player's eye direction to move, but it does not move the weapon model with it. This ends up looking kind of strange with the aim being up and right, but the model pointing at the original location. I like the effect that the punch angle creates in that it decays back to the original aim point, so does anyone know a way to get the weapon model to move with the punch angle? Any help, or even pointers to what I need to adjust so that I can do it myself would help. Rob Prouse Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] HLCoder on Google [Serious OT Action]
I don't know how Google manages to do it either, but my site gets searched by google spiders about 200 times a month. That's 200 separate visits, not hits! At 05:25 PM 06/02/2002 -0500, you wrote: -- [ Picked text/plain from multipart/alternative ] Yes, of that I am aware. I am only stating that google does a very good job of retrieving it. I'm curious to know why it indexes it so quickly that's all. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Problem with m_iClip being different on client and server
Ronald wrote: Nothing is being clobbered.. The code is never compiled ;) #if 0 Nothing is compiled in here. #endif I realize that is not getting compiled, that is what worries me, because what is getting compiled is; #if 0 //.. #else m_iClip += 10; #endif Which is adding 10 to m_iClip for a reload. This is not correct, I just want to know if it is a hack and m_iClip gets restored to it's correct value later in the sequence. Rob Prouse At 07:39 PM 14/11/2001 -0500, you wrote: I've been having problems with the value of m_iClip being incorrect on the client side since the port to 2.2. I noticed the following code in the client CBasePlayerWeapon that looks like a problem. Is this the case or is it compensated for elsewhere? If it is dealt with elsewhere, then where? void CBasePlayerWeapon::ItemPostFrame( void ) { if ((m_fInReload) (m_pPlayer-m_flNextAttack = 0.0)) { #if 0 // FIXME, need ammo on client to make this work right // complete the reload. int j = min( iMaxClip() - m_iClip, m_pPlayer-m_rgAmmo[m_iPrimaryAmmoType]); // Add them to the clip m_iClip += j; m_pPlayer-m_rgAmmo[m_iPrimaryAmmoType] -= j; #else m_iClip += 10; #endif m_fInReload = FALSE; } // ... } It looks to me that the clip is passed to the client in HUD_WeaponsPostThink(), with pCurrent-m_iClip = pfrom-m_iClip. Why is the above code clobbering the correct value of m_iClip with an arbitrary amount? Is m_iClip just increased temporarily so we can get on with things until it is set to the correct value the next time the server updates the client? Am I just confused by the sequence and a hack to get things working? Rob 'Commando' Prouse Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Problem with Client side animations
I have written a knife based very closely on the crowbar in the SDK. Since I ported it to the 2.2 SDK, the client side animations are not working correctly. I have gone through my code line by line and compared it with the crowbar code. I have made everything the same except for the models and animations. My EV_Knife function is not getting called, although the primary attack is getting called in both client and server dll's. The PLAYBACK_EVENT_FULL() is getting called in my primary attack. This means that hit animations work fine (they are not scripted), but the miss animations don't work. Also, I ported all my other weapons without a problem, so I think I know everything I need to change (if anyone is interested, I have a list of changes need to add weapons within the new 2.2 client side scripting model) From what I can tell, in HUD_WeaponsPostThink() in hl_weapons.cpp, from-client.m_iId is being passed in as 0 for the knife when it should actually be 1. Because of this, the knife isn't being selected as the current weapon. Does this ring a bell? Anyone know where I should be looking? This same thing was also reported to the wavelength forumns with the crowbar, but it was not answered. To see if it was an SDK bug, I compiled the release version of the 2.2 SDK and it works. The URL for that post is; http://dynamic.gamespy.com/~wavelength/ubb/Forum3/HTML/008218.html Any ideas? Rob 'Commando' Prouse Tour of Duty Mod http://www.tourofdutymod.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders