Skip to content

Commit 5edf937

Browse files
author
Pavel Kovalenko
committed
Merge branch 'bugfixes'
2 parents 6f0cac6 + e9ef1ed commit 5edf937

25 files changed

+1146
-1147
lines changed

doc/design/task_list.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ c Canceled
1313

1414
nitrocaster: Pavel Kovalenko
1515
- Mgc::Math::PI (MgcMath.h) conflicts with PI macro
16-
- try to remove OpenAL from repository
17-
- remove lzo and other compression libs from repository
1816
- get the entire solution compiled with ForceConformanceInForLoopScope=false
1917
- get rid of atimgpu, use amd ags instead (will also eliminate LNK4098)
2018
- scan solution with PVS-Studio and fix found bugs
@@ -25,10 +23,15 @@ nitrocaster: Pavel Kovalenko
2523
- merge xrXMLParser into xrCore
2624
- merge crypto into xrCore
2725
- 3rd party libraries
28-
- detach/update ODE
26+
- decouple/update ODE
2927
- dig through current ODE and analyze changes that were made by GSC
3028
- get the latest ODE and make sure it can be used with xray
31-
- remove openssl code from crypto, use it as external library
29+
- decouple OpenSSL
30+
- decouple OpenAL
31+
- decouple GameSpy
32+
- decouple lzo
33+
- decouple PPMd
34+
- decouple hxGrid
3235
- bugs/issues
3336
- generic
3437
- stackoverflow when starting with too long command line
@@ -48,10 +51,10 @@ nitrocaster: Pavel Kovalenko
4851
- xrGameSpy: fix master server name (gamespy is down)
4952
- dedicated server
5053
- vulnerabilities (verify)
51-
- dirtysky
52-
- stalkazz
53-
- stalkerbof
54-
- stalkerboom
54+
c dirtysky
55+
+ stalkazz
56+
+ stalkerbof
57+
+ stalkerboom
5558
+ voting for weather: rainy/cloudy buttons are mixed up
5659
- render
5760
- when d3d compiler fails to compile some shader, it displays message
@@ -72,7 +75,7 @@ nitrocaster: Pavel Kovalenko
7275
- close sleep dialog by ESC key
7376
- multiplayer
7477
- use GSC server instead of GameSpy one
75-
- ipv6 support
78+
- ipv6 support
7679
- get rid of DirectPlay
7780
- log suspicious packets and kick/ban its senders after X attempts
7881
- dedicated server

res/gamedata/scripts/lua_help.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ C++ class vector {
213213
function mad(const vector&, const vector&, const vector&);
214214

215215
function clamp(const vector&);
216-
function clamp(const vector&, vector);
216+
function clamp(const vector&, const vector&);
217217

218218
function inertion(const vector&, number);
219219

src/Layers/xrRender/VertexCache.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#include "stdafx.h"
22
#include "VertexCache.h"
33

4-
VertexCache::VertexCache()
4+
VertexCache::VertexCache() : VertexCache(16)
55
{
6-
VertexCache(16);
76
}
87

98

src/Layers/xrRender/dxUIRender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void dxUIRender::PushPoint(float x, float y, float z, u32 C, float u, float v)
200200
void dxUIRender::StartPrimitive(u32 iMaxVerts, ePrimitiveType primType, ePointType pointType)
201201
{
202202
VERIFY(PrimitiveType==ptNone);
203-
VERIFY(m_PointType==ptNone);
203+
VERIFY(m_PointType==pttNone);
204204
//. R_ASSERT(pointType==pttLIT);
205205

206206
m_iMaxVerts = iMaxVerts;

src/Layers/xrRenderPC_R3/r3_loader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ void CRender::LoadBuffers (CStreamReader *base_fs, BOOL _alternative)
219219
u32 count = fs->r_u32();
220220
_DC.resize (count);
221221
_VB.resize (count);
222+
u32 bufferSize = (MAXD3DDECLLENGTH+1)*sizeof(D3DVERTEXELEMENT9);
223+
D3DVERTEXELEMENT9* dcl = (D3DVERTEXELEMENT9*)_alloca(bufferSize);
222224
for (u32 i=0; i<count; i++)
223225
{
224226
// decl
225227
// D3DVERTEXELEMENT9* dcl = (D3DVERTEXELEMENT9*) fs().pointer();
226-
u32 buffer_size = (MAXD3DDECLLENGTH+1)*sizeof(D3DVERTEXELEMENT9);
227-
D3DVERTEXELEMENT9 *dcl = (D3DVERTEXELEMENT9*)_alloca(buffer_size);
228-
fs->r (dcl,buffer_size);
229-
fs->advance (-(int)buffer_size);
228+
fs->r (dcl,bufferSize);
229+
fs->advance (-(int)bufferSize);
230230

231231
u32 dcl_len = D3DXGetDeclLength (dcl)+1;
232232
_DC[i].resize (dcl_len);

src/Layers/xrRenderPC_R4/r4_loader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ void CRender::LoadBuffers (CStreamReader *base_fs, BOOL _alternative)
194194
u32 count = fs->r_u32();
195195
_DC.resize (count);
196196
_VB.resize (count);
197+
u32 bufferSize = (MAXD3DDECLLENGTH+1)*sizeof(D3DVERTEXELEMENT9);
198+
D3DVERTEXELEMENT9* dcl = (D3DVERTEXELEMENT9*)_alloca(bufferSize);
197199
for (u32 i=0; i<count; i++)
198200
{
199201
// decl
200202
// D3DVERTEXELEMENT9* dcl = (D3DVERTEXELEMENT9*) fs().pointer();
201-
u32 buffer_size = (MAXD3DDECLLENGTH+1)*sizeof(D3DVERTEXELEMENT9);
202-
D3DVERTEXELEMENT9 *dcl = (D3DVERTEXELEMENT9*)_alloca(buffer_size);
203-
fs->r (dcl,buffer_size);
204-
fs->advance (-(int)buffer_size);
203+
fs->r (dcl,bufferSize);
204+
fs->advance (-(int)bufferSize);
205205

206206
u32 dcl_len = D3DXGetDeclLength (dcl)+1;
207207
_DC[i].resize (dcl_len);

src/xrCDB/ISpatial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void ISpatial_DB::insert (ISpatial* S)
261261
if (!bValid)
262262
{
263263
CObject* O = dynamic_cast<CObject*>(S);
264-
if (O) Debug.fatal(DEBUG_INFO,"Invalid OBJECT position or radius (%s)",O->cName());
264+
if (O) Debug.fatal(DEBUG_INFO,"Invalid OBJECT position or radius (%s)",O->cName().c_str());
265265
else {
266266
CPS_Instance* P = dynamic_cast<CPS_Instance*>(S);
267267
if (P) Debug.fatal(DEBUG_INFO,"Invalid PS spatial position{%3.2f,%3.2f,%3.2f} or radius{%3.2f}",VPUSH(S->spatial.sphere.P),S->spatial.sphere.R);

src/xrCore/LocatorAPI_defs.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
//////////////////////////////////////////////////////////////////////
1313
// FS_File
1414
//////////////////////////////////////////////////////////////////////
15-
FS_File::FS_File(xr_string nm, long sz, time_t modif,unsigned attr) {set(nm,sz,modif,attr);}
16-
FS_File::FS_File(xr_string nm) {set(nm,0,0,0);}
15+
FS_File::FS_File(const xr_string& nm, long sz, time_t modif,unsigned attr) {set(nm,sz,modif,attr);}
16+
FS_File::FS_File(const xr_string& nm) {set(nm,0,0,0);}
1717
FS_File::FS_File(const _FINDDATA_T& f) {set(f.name,f.size,f.time_write,(f.attrib&_A_SUBDIR)?flSubDir:0);}
18-
FS_File::FS_File(xr_string nm, const _FINDDATA_T& f) {set(nm,f.size,f.time_write,(f.attrib&_A_SUBDIR)?flSubDir:0);}
18+
FS_File::FS_File(const xr_string& nm, const _FINDDATA_T& f) {set(nm,f.size,f.time_write,(f.attrib&_A_SUBDIR)?flSubDir:0);}
1919

20-
void FS_File::set(xr_string nm, long sz, time_t modif,unsigned attr)
20+
void FS_File::set(const xr_string& nm, long sz, time_t modif,unsigned attr)
2121
{
2222
name = nm; xr_strlwr (name);
2323
size = sz;

src/xrCore/LocatorAPI_defs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ struct XRCORE_API FS_File{
5656
time_t time_write;
5757
long size;
5858
xr_string name; // low-case name
59-
void set (xr_string nm, long sz, time_t modif,unsigned attr);
59+
void set (const xr_string& nm, long sz, time_t modif,unsigned attr);
6060
public:
6161
FS_File (){}
62-
FS_File (xr_string nm);
62+
FS_File (const xr_string& nm);
6363
FS_File (const _FINDDATA_T& f);
64-
FS_File (xr_string nm, const _FINDDATA_T& f);
65-
FS_File (xr_string nm, long sz, time_t modif,unsigned attr);
64+
FS_File (const xr_string& nm, const _FINDDATA_T& f);
65+
FS_File (const xr_string& nm, long sz, time_t modif,unsigned attr);
6666
bool operator< (const FS_File& _X) const {return xr_strcmp(name.c_str(),_X.name.c_str())<0; }
6767
};
6868
DEFINE_SET (FS_File,FS_FileSet,FS_FileSetIt);

src/xrCore/_cylinder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,6 @@ typedef _cylinder<float> Fcylinder;
218218
typedef _cylinder<double> Dcylinder;
219219

220220
template <class T>
221-
BOOL _valid (const _cylinder<T>& c) { return _valid(c.m_center) && _valid(c.m_direction) && _valid(c.m_height) && _valid(c.m_height); }
221+
BOOL _valid (const _cylinder<T>& c) { return _valid(c.m_center) && _valid(c.m_direction) && _valid(c.m_height) && _valid(c.m_radius); }
222222

223223
#endif // _DEBUG

0 commit comments

Comments
 (0)