Untitled

 avatar
unknown
plain_text
2 years ago
1.4 kB
4
Indexable
int x_ = (pInfo(peer)->state == 16 ? (int)p_->x / 32 : round((double)p_->x / 32)), y_ = (int)p_->y / 32;
									if (x_ < 0 or x_ >= 100 or y_ < 0 or y_ >= 60) continue;
									WorldBlock* block_ = &world_->blocks[x_ + (y_ * 100)];
								if (pInfo(peer)->c_x * 32 != (int)p_->x and pInfo(peer)->c_y * 32 != (int)p_->y and not pInfo(peer)->ghost) {
										bool hackvar = false;
										if (pInfo(peer)->superdev || find(world_->admins.begin(), world_->admins.end(), pInfo(peer)->tankIDName) != world_->admins.end() || pInfo(peer)->mod || world_->owner_name == pInfo(peer)->tankIDName || pInfo(peer)->level > 35 || pInfo(peer)->dev) {
										}
										else hackvar = pathfind(world_, pInfo(peer)->x, pInfo(peer)->y, block_, peer);
										if (world_->blocks[x_ + (y_ * 100)].locked) {
											WorldBlock* block2_ = &world_->blocks[world_->blocks[x_ + (y_ * 100)].lock_origin];
											if (find(block2_->admins.begin(), block2_->admins.end(), pInfo(peer)->tankIDName) != block2_->admins.end()) hackvar = false;
										}
										if (hackvar) {
											if (items[world_->blocks[x_ + (y_ * 100)].fg].actionType != 31) {
												gamepacket_t p(0, pInfo(peer)->netID);
												p.Insert("OnSetPos");
												p.Insert(pInfo(peer)->x, pInfo(peer)->y);
												p.CreatePacket(peer);
												}

											break;
										}
									}
Editor is loading...