]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bspfile_abstract.c
Merge branch 'sysfprintf' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bspfile_abstract.c
index a20a5963ffa8fa9bb185bf65fd7dc08686a10fd7..eb9bc4326a170c44a4694344586dce6f681d85f0 100644 (file)
@@ -104,7 +104,7 @@ void SetDrawSurfacesBuffer(){
 
        bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
 
-       memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawVert_t ) );
+       memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawSurface_t ) );
 }
 
 void SetDrawSurfaces( int n ){
@@ -117,7 +117,7 @@ void SetDrawSurfaces( int n ){
 
        bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
 
-       memset( bspDrawSurfaces, 0, n * sizeof( bspDrawVert_t ) );
+       memset( bspDrawSurfaces, 0, n * sizeof( bspDrawSurface_t ) );
 }
 
 void BSPFilesCleanup(){
@@ -831,7 +831,7 @@ vec_t FloatForKey( const entity_t *ent, const char *key ){
    gets a 3-element vector value for an entity key
  */
 
-void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
+qboolean GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
        const char  *k;
        double v1, v2, v3;
 
@@ -845,6 +845,9 @@ void GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec ){
        vec[ 0 ] = v1;
        vec[ 1 ] = v2;
        vec[ 2 ] = v3;
+
+       /* true if the key is found, false otherwise */
+       return strlen( k );
 }