Skip to content

Instantly share code, notes, and snippets.

so you want to have a Tank, and then you have different sub-tanks which have different AIs, yeah? and all the AIs need their own state

pub struct Tank<A> {
    pub pos: f32
    pub health: u32,
    pub ai: A
}
impl<A: TankAi> Tank<A> {
 fn think(&amp;mut self) { <a as="" tankai="">::think(self) }</a>
#0 ___chkstk_ms ()
at ../../../../../src/gcc-4.9.1/libgcc/config/i386/cygwin.S:146
#1 0x000000000041b65e in vel0city::vertex_array_object::get_vertex_array_object<u16> (display=0x18f830, vertex_buffers=..., indices=0x18d6d0,
program=0x301c110)
at C:\Users\Nathaniel\.cargo\git\checkouts\glium-cee1c79709e4d1bd\master\src/vertex_array_object.rs:240
#2 0x0000000000416b0b in vel0city::ops::draw::draw<u16,&glium::uniforms::uniforms::UniformsStorage<core::iter::Chain<core::option::IntoIter<(&str, glium::uniforms::value::UniformValue)>, core::option::IntoIter<(&str, glium::uniforms::value::UniformValue)>>>,&glium::vertex::buffer::VertexBuffer<vel0city::graphics::Vertex>> (display=0x18f830, framebuffer=..., vertex_buffers=<optimized out>,
indices=..., program=<optimized out>, uniforms=<optimized out>,
draw_parameters=<optimized out>, dimensions=...)
at C:\Users\Nathaniel\.cargo\git\checkouts\glium-cee1c79709e4d1bd\master\src\ops/draw.rs:99
#3 0x00000000004154a4 in draw<&glium::vertex::buffe
244 &IndicesSource::NoIndices { .. } => 0,
(gdb) disassemble
Dump of assembler code for function vel0city::vertex_array_object::get_vertex_array_object<u16>:
0x000000000041b640 <+0>: push %rbp
0x000000000041b641 <+1>: mov %rsp,%rbp
0x000000000041b644 <+4>: push %r15
0x000000000041b646 <+6>: push %r14
0x000000000041b648 <+8>: push %r13
0x000000000041b64a <+10>: push %r12
0x000000000041b64c <+12>: push %rsi
let name = &data[0..64];
let namelen = name.iter()
.position(|&c| c == 0)
.unwrap_or(name.len());
let name = String::from_utf8_lossy(&name[..namelen).to_string();
window.ravioli_ravioli_give_me_the_rawinputuoli() -> bool; // name not final
if it returns true, now you get RawMouseMove events instead of (or in addition to?) MouseMove events
RawMouseMove(delta_x: i32, delta_y: i32)
also, window.grab_pointer() -> bool; // tries to grab the pointer, preventing it from leaving the window and hiding it
{
"classname" "worldspawn"
}
{
"classname" "out_of_bounds"
"model" "*1"
}
rand1 = np.random.rand() - 0.5
rand2 = np.random.rand() - 0.5 + rand1
x = rand2
rand3 = np.random.rand() - 0.5
rand4 = np.random.rand() - 0.5 + rand3
y = rand4
Destroy:
````rust
trait Destroy {
/// Called only when panicking
pub fn destroy(&mut self);
}
````
Drop:
typedef unsigned long int uint32;
#define FlipBytes32(A) ((((uint32)(A) & 0xff000000) >> 24) | (((uint32)(A) & 0x00ff0000) >> 8) | (((uint32)(A) & 0x0000ff00) << 8) | (((uint32)(A) & 0x000000ff) << 24))
static const unsigned char MungeTable2[] = {0x05, 0x61, 0x7A, 0xED, 0x1B, 0xCA, 0x0D, 0x9B, 0x4A, 0xF1, 0x64, 0xC7, 0xB5, 0x8E, 0xDF, 0xA0 };
void Crypt(char *packet, int length, int z, bool unpack)
{
unsigned int * lbuff = (unsigned int *)packet;
unsigned int ebpc;
let cmds = *((INTERFACES.input as usize + 0xC4) as *const *mut sdk::CUserCmd);
let cmd = cmds.offset((sequence_number % 90) as isize);