Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
bolt_server.cpp
Go to the documentation of this file.
1
#include "
bolt.h
"
2
#include "
gfxlib.h
"
3
#include "
gfx/mesh.h
"
4
#include "
gfxlib_struct.h
"
5
#include <vector>
6
7
#include <string>
8
#include <algorithm>
9
#include "
unit_generic.h
"
10
#include "
configxml.h
"
11
GFXVertexList
*
bolt_draw::boltmesh
= NULL;
12
13
bolt_draw::~bolt_draw
()
14
{
15
unsigned
int
i
;
16
for
(i = 0; i <
balls
.size(); i++)
17
for
(
int
j =
balls
[i].
size
()-1;
j
>= 0;
j
--)
18
balls
[i][j].Destroy( j );
19
for
(i = 0; i <
bolts
.size(); i++)
20
for
(
int
j =
balls
[i].
size
()-1;
j
>= 0;
j
--)
21
bolts
[i][j].Destroy( j );
22
}
23
24
bolt_draw::bolt_draw
()
25
{
26
boltmesh
= NULL;
27
boltdecals
= NULL;
28
}
29
int
Bolt::AddTexture
(
bolt_draw
*
q
, std::string
file
)
30
{
31
int
decal = 0;
32
if
( decal >= (
int
) q->
bolts
.size() )
33
q->
bolts
.push_back( vector< Bolt > () );
34
return
decal;
35
}
36
int
Bolt::AddAnimation
(
bolt_draw
*q, std::string file,
QVector
cur_position )
37
{
38
int
decal = 0;
39
if
( decal >= (
int
) q->
balls
.size() )
40
q->
balls
.push_back( vector< Bolt > () );
41
return
decal;
42
}
43
44
void
Bolt::Draw
() {}
45
extern
void
BoltDestroyGeneric
(
Bolt
*whichbolt,
unsigned
int
index
,
int
decal,
bool
isBall );
46
void
Bolt::Destroy
(
unsigned
int
index
)
47
{
48
BoltDestroyGeneric
(
this
, index, decal, type->
type
!=
weapon_info::BOLT
);
49
}
50
src
cmd
bolt_server.cpp
Generated on Fri May 29 2015 23:07:10 for Vegastrike 0.5.1 rc1 by
1.8.4