GangsterAngel Posted November 21, 2005 Posted November 21, 2005 Hey , im trying to make a Spraypaint thing like in CounterStrike. right now im having a problem with structs. the structure values seem to be diffrent in each file for examle cg_Draw.c JKG_Sprays.Spray[1].Value1 seems to be diffrent than the value set in JKG_Sprays.Spray[1].Value1 in cg_events.c Heres the code to the structure im using. //======JKG SPRAYPAINT =============== typedef struct JKG_SprayInfo_s { vec3_t origin; int sprayindex; int InUse; } JKG_SprayInfo_t; typedef struct JKG_GlobalSpray_s { JKG_SprayInfo_t Spray[12]; } JKG_GlobalSpray_t; static JKG_GlobalSpray_t JKG_Sprays; //====END SPRAYPAINT ==================
MDN14 Posted November 21, 2005 Posted November 21, 2005 I dont know how to get the coding to work, but I wanted to make a suggestion about the sprays. Custom sprays may be fun, but if you allow them in JA it will lead to all the porn sprays that can be seen and found in CS. So I would only allow like 10 different sprays that you can choose from that come with your mod.
GangsterAngel Posted November 21, 2005 Author Posted November 21, 2005 to be honist i couldent care less if ppl used porn sprays, but there would only be a selection that come with the mod anyway. if i ever work out whats going wrong with the structure
GangsterAngel Posted November 22, 2005 Author Posted November 22, 2005 http://img498.imageshack.us/img498/6655/paint9rm.jpg still need to workout whats happning with the structs to get it to work how i want though
ensiform Posted November 22, 2005 Posted November 22, 2005 you do know ppl wont be able to have custom sprays because they dont exactly have the spray for 1 and unless your gonna hack the engine with a better http/ftp dl system (which i doubt it) because doing it via mod just doesnt cut it as good as if it were part of the engine. also... your just copying ideas from others and its not like it is a neccesity to have
GangsterAngel Posted November 22, 2005 Author Posted November 22, 2005 Others? , theres no other mods that have it. not that i know of.
Jufa Posted November 23, 2005 Posted November 23, 2005 yea i never heard about mod that had a spraypaint in it. and about that ftp/http system.... its doable. I know mod that has it (its xmod if i remeber right) for faster map downloads.
GangsterAngel Posted November 23, 2005 Author Posted November 23, 2005 anyone got any ideas on how to make the spray always face up, yet keep on the same angles of the brush? also i need to move the spray fowards abit, so theres no Z fighting.
razorace Posted November 25, 2005 Posted November 25, 2005 1. 'static' defined structs can't be referenced in other files. That's your problem. you need to unstatic it and then make a extern prototype reference to it in the other file before you can use it. 2. How are you aligning your sprays? Maybe I could help with the alignment if I knew how you're doing it.
GangsterAngel Posted December 5, 2005 Author Posted December 5, 2005 im using the traces plane to align them.
razorace Posted December 6, 2005 Posted December 6, 2005 hmmm, it should be facing up correctly. My guess is that somehow a roll component is getting inserted into the spray's angles.
ensiform Posted December 6, 2005 Posted December 6, 2005 yea i never heard about mod that had a spraypaint in it. and about that ftp/http system.... its doable. I know mod that has it (its xmod if i remeber right) for faster map downloads. i know that red slushie / ensimod uses same lib to do so.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.