Announcement

Collapse
No announcement yet.

Access to all entities clienside?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access to all entities clienside?

    Is there a way, or it can be effectively implemented, to get the complete list and handle of all the entities that the client program owns?

    For example, a cheat in Counter Strike uses aimhack, it need to get access to the coords of the entities owned by the client, that effectively are handled in the client program.

    I want full access like that from CSQC.

    CSQC let me spawn new entities and manage a list of entities but only the entities spawned from inside CSQC, outside of that scope the only access is local player number, local player coords and so, but nothing more.

    I want to have full access to all the entities like calling the function nextent.

    Maybe can be created a new function called "nextent2", or something like that, giving access to only the entities working internally clientside (but not the csqc created ones, that will be accessed as usual with nextent).

    That will be great because we can implement anti-hack systems using only QC, and of course we can do a lot of things like augumented reality clientside without the need to implement it serverside.

    For now, I need to create shared entities serverside too. That uses unnecesary bandwidth (a little but it uses, and anyway, I need to take a lot of care creating/removing that kind of entities). But if I don't, the csqc cannot do nothing about entities in the game, because it does not have access to the real entities.

    I don't understand why it was not implemented. I can understand that QC allocates the list of entities locally, but I don't understand why it cannot receive too the list from the internal hadling if it is running in the user PC too, as client, but it is running and handling the entities (if not it cannot render anything).

    Of course, it can go out a little of the QC scope, but I guess it is possible to implement without breaking nothing, only adding the feature.

  • #2
    so you want to implement an aimbot? or what?
    the suggestion of making an 'anti-hack' feature in csqc is bullshit. if you want to make that sort of thing, get a clue and do it in ssqc.
    simply put, if they can hack the engine to implement an aimbot, they can also hack the engine to disable its csqc protection and use your glorious 'anti-hack' features to decompile the csprogs and more easily stick their aimbot in there instead. This is typically the easier way to make an aimbot.
    This is why csqc originally wasn't even supposed to know the origin of the player.

    If I understand correctly, you're basically asking for what the 'deltalisten' csqc builtin already does. Pass "*" for the model name if you want all entities. Obviously its limited, the client doesn't have access to all fields from the server. The fact that it supports different functions for different model(indexes) can save a decent bit of entity management.
    Side note: DP doesn't implement deltalisten as far as I'm aware. You can try to use the less-efficient getentity builtin instead if you want something more unwieldly but also more portable. If you're just looking for players then its probably good enough for you to use to implement your aimbot... err, anti-aimbot sorry.
    Some Game Thing

    Comment


    • #3
      How do most of these multiplayer aimbots identify a client / player to target? Do they go simply by the model?

      Comment


      • #4
        model+frame is one option (to avoid aiming at corpses). directly assuming certain entity numbers are players is another option.
        Some Game Thing

        Comment


        • #5
          I don't want an aimbot, I want an aim aid system for a mod what I am making.

          I used that about aimbot as an example. Anyway, maybe it is a rule, I don't know, but I think that when you reveal more data, you can be strong. Limiting something like hidding entities to do not let the player cheat, will not stop the cheaters cheating, that will only leave the non cheaters in disadvantage.
          I guess the correct way to stop cheaters is, as easy and stupid as sounds: Let all cheat, or not let nobody cheat.
          But if I don't want somebody to cheat, then make the things that works near uncheatable, I think.
          Although perfectly uncheatable is impossible, we can implement some workarounds to limit a cheat.

          One of that kind of workarounds what I want to implement is: letting all use something like an aimbot. And that gives to the game a different experience. Now, you don't need to be good aiming, but in strategic, searching, running and so.


          My game mod uses a suit with "aid aiming systems", and I need to make the suit aim the weapon automatically.

          The game challenging centers in solving puzzles (searching for your way, activating doors, searching some upgrade, and so) not only killing things around.

          Of course, the player can choose not to get assisted by the aim system (activating or deactivating it) if he/she prefer that.

          Anyway, that is in theory, in real I am still not implementing something like that because it is too hard for me maintain playability and not annoying the player with such things. I mean, doing it enough well to acomplish with that. But I am thinking to implement some angle aiming speed limit, so the player cannot turn too fast to aim, because if not, the server will detect it as a cheat.

          And for augumented reality (and auto aim) can be helpful know all the entities instead of spawing temp entities or shared entities duplicating the ammount of entities in the game just only to spawn a label for the aim aid system.
          I need access to all entities (not all fields, only need to know the origin and the model or something to identify the kind of entity), to avoid the need of spawing shared entities. So I can reuse the already provided data (from server to client). And not as I am doing right now duplicating data because I need to spawn serverside shared entities to receive and draw labels clientside (that sounds some stupid, not?).

          Anti hack system (as I know) need too clientside handle because if I implement something like the limited angle speed of the player aiming, if the player aims too fast, then the server can kick that player (it is using aimbot for example or modified csqc). But if the client is using the lawful csqc (not modified), it will limit the player aiming speed clientside too (complaining with that server expects and showing in the client screen the correct behaviour), and the server don't will detect it as a cheater and don't will kick it out.
          Or, instead of kicking it can limit the aim speed serverside and the cheating client will get an outsynced behaviour.

          So, It is possible to implement only ssqc "anti-hack", but the client need to be in sync with it too so the server don't see it as a cheater and/or the client can see the correct movement in him/her screen.

          Anyway, I don't know if that can be implemented actually in csqc (limiting player angle aiming speed server and clientside). Maybe it is possible but I don't get the idea or how to do it now using QuakeC.

          That was what I am asking.
          I assumed that CSQC cannot have access to all entities because I don't found a function that can do it.
          And I searched in the source code of Darkplaces and it appears to no be implemented at all.
          In Darkplaces CSQC is limited in a self context, and cannot escape from that. It is like a jailroot.
          But I don't know if outside of that there are some function that can give me access for something more.

          So I will try to use that function "getentity".
          I am now seeing that it can in fact reach render entity data. Not handling remove and so, but that was expected as it only request the data.


          I don't know how I not figured it out before. Thank you very much.

          And I was read that in csprogsdefs.qc, how I not figured it before? lol

          Ok, thank you, bye, and I hope I have clarified my intentions (I am not trying to cheat, I just hate cheaters annoying me all the time in all kind of online games, specially fps ones).
          Last edited by anyeos; 05-05-2014, 12:23 PM.

          Comment


          • #6
            Don't know if it's applicable, but you can punish players trying to cheat in ssqc. I added a couple lines in playerprethink function that checks for a noclip flag on the player during DM. If it checks true, it localcmd's a kill command to the player and turns noclip back off. Just a thought.
            'Replacement Player Models' Project

            Comment


            • #7
              I don't want an aimbot, I want an aim aid system for a mod what I am making.
              wow the bullsh!t is gettin thick around here. There is a server command called SV_AIM which is basically a built-in aimbot for the clients! default is 0.93 which is like saying the server will adjust your aim by 7%. sv_aim >= 1.0 means 100% aim is controlled by the client.

              If you are making a "mod", making a server_side aim-assist weapon in quakeC is pretty damn easy. It's kinda 'ghey' imho.... but i doubt you will finish this mod anyways.
              Last edited by R00k; 05-05-2014, 03:50 PM.
              www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

              Comment


              • #8
                So what cheat puts a player in noclip? I thought movetypes were all set serverside...unless you are talking pak2, where the client side models are oversized and stick through the walls.

                Does the anti wall hack feature prevent stuff like pak 2?



                Originally posted by Dutch View Post
                Don't know if it's applicable, but you can punish players trying to cheat in ssqc. I added a couple lines in playerprethink function that checks for a noclip flag on the player during DM. If it checks true, it localcmd's a kill command to the player and turns noclip back off. Just a thought.

                Comment


                • #9
                  I suppose you could code a test that takes place over several minutes and generates a score to determine if its a bot. I have seen some servers give false positives when you spin really fast, and fire and happen to kill a player...it tends to think you are a bot and issues a warning. When I took a leave from Quake for a few years and played RTCW , I knew the feel of the engine pretty well, and could tell when someone was botting. The thing to look for is a mild change of speed when you are moving. Hard to really explain, but its almost like the server performance reduces about 10% overall. One time , I called a player out on botting, and he was amazed that I knew. I told him , and not too shortly after, alot of the servers started making the players move faster so it would be harder to pick up. The new movement sort of reminded me of how QW netplay is. Something about it just feels wrong compared to normal NQ....never got into QW too much because of that.

                  Originally posted by Spike View Post
                  model+frame is one option (to avoid aiming at corpses). directly assuming certain entity numbers are players is another option.

                  Comment


                  • #10
                    So what cheat puts a player in noclip?
                    Not a cheat really, but I noticed I could engage noclip as server of a DM game. Just tried it on a dedicated server as a client and it turns out it doesn't allow it (this is DP by the way, it trips the sv_cheats cvar must be set to 1, even if it is 1).

                    So, correct me if I'm wrong, but if you're the server in a DP game, you can noclip, but not if you're a client?

                    Probly something I'm overlooking. I never got too involved in DM. I probly sound like a total scrub, too, but oh well, at least I can admit it. lol.
                    'Replacement Player Models' Project

                    Comment


                    • #11
                      NoClip is a server-side command. Mostly used for testing, by moving over the map freely instead of the long way, directly running through it.

                      Yet unlike other serverside commands it will pass the cmd to the server from the client. If the player's client_t flag:
                      Code:
                       	qboolean	privileged;		// can execute any host command
                      is set true then yes that client can use noclip.

                      Getting the client_t struct in QuakeC is a masterful hack, but possible. Yet setting the flag would require modifying the source to the progs.dat on the server.

                      So in all, it's simply up to the coder or the server admin. Or, if someone is running a local listen server yes he could enable noclip on his own player, by entering the command in the console, (or any other cmd GIVE, GOD, FLY etc).

                      But for someone to run a server just to cheat? Hmm, kinda weak sauce.

                      Anyways...... here's a bit of code you could implement for your 'aimbot-weapon'.
                      I use this code to look at the person who killed you in CAx.
                      Code:
                      void (vector v) angles_fixangle =
                      {
                      	local vector fv;	
                      	
                      	self.ca_oldangle = v;
                      	self.angles = (v);
                      	self.v_angle = (v);
                      	self.fixangle = TRUE;
                      };
                      
                      vector (vector from, vector to, float turnrate) angles_bestaim =
                      {
                      	local vector bestaim;
                      
                      	bestaim = vectoangles ((to - from));
                      	if ((bestaim_x > 270))
                      	{
                      		bestaim_x = (360 - bestaim_x);
                      		if ((bestaim_x > 78))
                      		{
                      			bestaim_x = 78;
                      		}
                      	}
                      	else
                      	{
                      		bestaim_x = (0 - bestaim_x);
                      		if ((bestaim_x < -68))
                      		{
                      			bestaim_x = -68;
                      		}
                      	}
                      	if (turnrate > 0 && turnrate < 1)
                      		return (bestaim * turnrate);
                      	else
                      		return (bestaim);
                      };
                      
                      void() PlayerDeathThink =
                      /////......................
                      	//R00k 1.55 look at enemy when dead
                      	if ((self.enemy.classname == "player") && (self.enemy != self))
                      		self.movetarget = self.enemy;
                      
                      	if (ca_gametype & CA_MATCH_MODE)
                      	if (self.movetarget.player_flag == PF_PLAYING)
                      	{
                      		makevectors (self.v_angle);
                      		traceline (self.origin, self.movetarget.origin, TRUE, self.movetarget);
                      		if (trace_fraction == 1)
                      		{
                      			angle = angles_bestaim (self.origin, self.movetarget.origin, 0.9);
                      			angles_fixangle (angle);
                      		}
                      	}
                      ////..........................
                      Last edited by R00k; 05-06-2014, 09:52 AM.
                      www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                      Comment


                      • #12
                        Yes, thats normal legacy behaviour.

                        As a player running a server you are in "listen mode" and are in client slot #1.....more or less its alot like single player except other players can join.
                        DEATHMATCH 1 takes you into deathmatch mode where items will now spawn differently etc.

                        When in Dedicated mode there is no local player running the server, so most single player command line things wont work the same. You could definately write QC that can give any kind of movetype to specific things whatever need be though.

                        Dedicated mode also usually uses less memory than listen mode.

                        Originally posted by Dutch View Post
                        Not a cheat really, but I noticed I could engage noclip as server of a DM game. Just tried it on a dedicated server as a client and it turns out it doesn't allow it (this is DP by the way, it trips the sv_cheats cvar must be set to 1, even if it is 1).
                        So, correct me if I'm wrong, but if you're the server in a DP game, you can noclip, but not if you're a client?
                        Probly something I'm overlooking. I never got too involved in DM. I probly sound like a total scrub, too, but oh well, at least I can admit it. lol.

                        Comment


                        • #13
                          What happen? I don't understand why some people treat me like trash.

                          I am making a mod, is that a crime?

                          A long time ago, more than ten years I made a mod just for fun. But now I cannot?

                          I explained a lot of things about what I want in the mod. It is not like that auto aiming from the server (but that can be of help). I want an aiming assist for the player, not the server. The server must take care of the rules of the game, not what the client decides to do with her/him mouse or computer (of course, there are a relation).

                          But thank you for that information anyway, it can be of help to begin.


                          The mod is not for online deatmatch playing, it is a single player / cooperative mod. So, cheating here maybe stupid, unless he/she want to have better score. But I don't have plans to make a scoring system for this mod.

                          It is about puzzles, the player must find him/her way and activate/deactivate some things and so. Get the keys and so. What you can do with a aiming cheat? Aiming to the keys? Aiming at the air? (Take care of no hitting a wall, lol). Of course, there are "monsters" too.

                          I am thankful for the help, but not for being treated like trash.

                          Anyway I am not the own of all the knowledge of the world, so, my ignorance I think is acceptable.


                          The mod must have:

                          Augumented reality. Showing indicators over possible enemy entities. Showing distance too, is a good feature.

                          Weapon aiming assist. Letting the player touch a key and the weapon automatically aims and maintain the aiming over the labeled enemy entity that is near the crosshair while the player press the button. But the movement of the aiming must be not too fast. So it can basically cannot aim in a time over a back enemy.


                          The mod is planed for play with joystick. An aiming help is like a must, because it is some hard to aim very well with a stick.

                          So, please, not to all, but to some people, stop the prejudices please. That don't help, it don't make me feel better.
                          I am not trying to challenging nobody. I only want to be fun with friends, that is some reasons for making the mod.

                          bye

                          PS: I am not searching for aiming clients, I want the "autoaim" for "monsters".

                          PS2: Just for clarify: I don't want a cheat like behaviour. I want to simulate a futuristic weapon system. So, it can have delay, can have speed limit, and so. It must not be like a cheat, it must be a simulation of a aiming system (like a cannon of a ship). Maybe it can handle too trajectory, and show a preview of the fire to the client, and so, all kind of simulations will beneficiate the impression for the player. I repeat: I am trying to ""simulate"" a auto aiming weapon system. Not just coding something to auto aim.
                          Last edited by anyeos; 05-07-2014, 12:34 AM.

                          Comment


                          • #14
                            I want an aiming assist for the player, not the server.
                            You started this conversation by trying to get all enemies handled on the client-side which sounds like you are trying to make a silly csqc aimbot. So, the flack you got was because of your contradictions by ignorance.

                            PS: I am not searching for aiming clients, I want the "autoaim" for "monsters".
                            The code i provided for you could be easily modified for NPCs, as for a turret.


                            Hope you get your mod working... sounds like you have a lot of work ahead of you...
                            www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                            Comment

                            Working...
                            X